Title: [216239] trunk/Source/WebCore
- Revision
- 216239
- Author
- carlo...@webkit.org
- Date
- 2017-05-05 05:02:33 -0700 (Fri, 05 May 2017)
Log Message
[GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handleMessage
https://bugs.webkit.org/show_bug.cgi?id=171721
Reviewed by Xabier Rodriguez-Calvar.
We are checking the GError only comparing the code, and ignoring the domain in some cases. Use g_error_matches()
in those cases instead of only checking the code.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (216238 => 216239)
--- trunk/Source/WebCore/ChangeLog 2017-05-05 11:56:22 UTC (rev 216238)
+++ trunk/Source/WebCore/ChangeLog 2017-05-05 12:02:33 UTC (rev 216239)
@@ -1,3 +1,16 @@
+2017-05-05 Carlos Garcia Campos <cgar...@igalia.com>
+
+ [GStreamer] Fix handling of gst errors in MediaPlayerPrivateGStreamer::handleMessage
+ https://bugs.webkit.org/show_bug.cgi?id=171721
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ We are checking the GError only comparing the code, and ignoring the domain in some cases. Use g_error_matches()
+ in those cases instead of only checking the code.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+
2017-05-04 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r216206.
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (216238 => 216239)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2017-05-05 11:56:22 UTC (rev 216238)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2017-05-05 12:02:33 UTC (rev 216239)
@@ -947,20 +947,19 @@
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, "webkit-video.error");
error = MediaPlayer::Empty;
- if (err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND
- || err->code == GST_STREAM_ERROR_WRONG_TYPE
- || err->code == GST_STREAM_ERROR_FAILED
- || err->code == GST_CORE_ERROR_MISSING_PLUGIN
- || err->code == GST_RESOURCE_ERROR_NOT_FOUND)
+ if (g_error_matches(err.get(), GST_STREAM_ERROR, GST_STREAM_ERROR_CODEC_NOT_FOUND)
+ || g_error_matches(err.get(), GST_STREAM_ERROR, GST_STREAM_ERROR_WRONG_TYPE)
+ || g_error_matches(err.get(), GST_STREAM_ERROR, GST_STREAM_ERROR_FAILED)
+ || g_error_matches(err.get(), GST_CORE_ERROR, GST_CORE_ERROR_MISSING_PLUGIN)
+ || g_error_matches(err.get(), GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_NOT_FOUND))
error = MediaPlayer::FormatError;
- else if (err->domain == GST_STREAM_ERROR) {
+ else if (g_error_matches(err.get(), GST_STREAM_ERROR, GST_STREAM_ERROR_TYPE_NOT_FOUND)) {
// Let the mediaPlayerClient handle the stream error, in
// this case the HTMLMediaElement will emit a stalled
// event.
- if (err->code == GST_STREAM_ERROR_TYPE_NOT_FOUND) {
- GST_ERROR("Decode error, let the Media element emit a stalled event.");
- break;
- }
+ GST_ERROR("Decode error, let the Media element emit a stalled event.");
+ break;
+ } else if (err->domain == GST_STREAM_ERROR) {
error = MediaPlayer::DecodeError;
attemptNextLocation = true;
} else if (err->domain == GST_RESOURCE_ERROR)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes