Title: [238287] trunk/Source/WebCore
Revision
238287
Author
[email protected]
Date
2018-11-16 10:14:43 -0800 (Fri, 16 Nov 2018)

Log Message

[MSE][GStreamer] Ignore caps notifications when tearing down the pipeline
https://bugs.webkit.org/show_bug.cgi?id=191578

Reviewed by Xabier Rodriguez-Calvar.

Changing the demuxer to READY state (which is done only in the main
thread) triggers the unlinking of its srcpads, which in turns emits a
caps change notification in the previously linked element since they
become unnegotiated again.

We are not interested in caps notifications in these cases, so let's
just ignore caps notifications emitted from the main thread.

This fixes an assertion failure in the debug builds.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (238286 => 238287)


--- trunk/Source/WebCore/ChangeLog	2018-11-16 17:51:10 UTC (rev 238286)
+++ trunk/Source/WebCore/ChangeLog	2018-11-16 18:14:43 UTC (rev 238287)
@@ -1,3 +1,23 @@
+2018-11-16  Alicia Boya GarcĂ­a  <[email protected]>
+
+        [MSE][GStreamer] Ignore caps notifications when tearing down the pipeline
+        https://bugs.webkit.org/show_bug.cgi?id=191578
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Changing the demuxer to READY state (which is done only in the main
+        thread) triggers the unlinking of its srcpads, which in turns emits a
+        caps change notification in the previously linked element since they
+        become unnegotiated again.
+
+        We are not interested in caps notifications in these cases, so let's
+        just ignore caps notifications emitted from the main thread.
+
+        This fixes an assertion failure in the debug builds.
+
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::AppendPipeline::AppendPipeline):
+
 2018-11-16  Sihui Liu  <[email protected]>
 
         Storing blobs in IDB on iOS: "Error preparing blob/file"

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp (238286 => 238287)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2018-11-16 17:51:10 UTC (rev 238286)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2018-11-16 18:14:43 UTC (rev 238287)
@@ -159,6 +159,17 @@
 
     GRefPtr<GstPad> appsinkPad = adoptGRef(gst_element_get_static_pad(m_appsink.get(), "sink"));
     g_signal_connect(appsinkPad.get(), "notify::caps", G_CALLBACK(+[](GObject*, GParamSpec*, AppendPipeline* appendPipeline) {
+        if (isMainThread()) {
+            // When changing the pipeline state down to READY the demuxer is unlinked and this triggers a caps notification
+            // because the appsink loses its previously negotiated caps. We are not interested in these unnegotiated caps.
+#ifndef NDEBUG
+            GRefPtr<GstPad> pad = adoptGRef(gst_element_get_static_pad(appendPipeline->m_appsink.get(), "sink"));
+            GRefPtr<GstCaps> caps = adoptGRef(gst_pad_get_current_caps(pad.get()));
+            ASSERT(!caps);
+#endif
+            return;
+        }
+
         appendPipeline->m_taskQueue.enqueueTask([appendPipeline]() {
             appendPipeline->appsinkCapsChanged();
         });
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to