Title: [278892] trunk/Source/WebCore
Revision
278892
Author
commit-qu...@webkit.org
Date
2021-06-15 13:11:18 -0700 (Tue, 15 Jun 2021)

Log Message

[GStreamer] Another crash under gst_element_add_pad
https://bugs.webkit.org/show_bug.cgi?id=225765

Patch by Philippe Normand <pnorm...@igalia.com> on 2021-06-15
Reviewed by Adrian Perez de Castro.

Decodebin3 in GStreamer <= 1.16 does not respect user-supplied select-stream events. So we
need to relax the release assert for these versions. This bug was fixed in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/b41b87522f59355bb21c001e9e2df96dc6956928

* platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
(WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (278891 => 278892)


--- trunk/Source/WebCore/ChangeLog	2021-06-15 19:15:32 UTC (rev 278891)
+++ trunk/Source/WebCore/ChangeLog	2021-06-15 20:11:18 UTC (rev 278892)
@@ -1,3 +1,17 @@
+2021-06-15  Philippe Normand  <pnorm...@igalia.com>
+
+        [GStreamer] Another crash under gst_element_add_pad
+        https://bugs.webkit.org/show_bug.cgi?id=225765
+
+        Reviewed by Adrian Perez de Castro.
+
+        Decodebin3 in GStreamer <= 1.16 does not respect user-supplied select-stream events. So we
+        need to relax the release assert for these versions. This bug was fixed in:
+        https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/b41b87522f59355bb21c001e9e2df96dc6956928
+
+        * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
+        (WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad):
+
 2021-06-06  Darin Adler  <da...@apple.com>
 
         Delete some recently-obsoleted files

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp (278891 => 278892)


--- trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2021-06-15 19:15:32 UTC (rev 278891)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp	2021-06-15 20:11:18 UTC (rev 278892)
@@ -238,8 +238,16 @@
 {
     auto padCaps = adoptGRef(gst_pad_query_caps(pad, nullptr));
     GST_DEBUG_OBJECT(m_pipeline.get(), "New decodebin pad %" GST_PTR_FORMAT " caps: %" GST_PTR_FORMAT, pad, padCaps.get());
-    RELEASE_ASSERT(doCapsHaveType(padCaps.get(), "video"));
 
+    // Decodebin3 in GStreamer <= 1.16 does not respect user-supplied select-stream events. So we
+    // need to relax the release assert for these versions. This bug was fixed in:
+    // https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/commit/b41b87522f59355bb21c001e9e2df96dc6956928
+    bool isVideo = doCapsHaveType(padCaps.get(), "video");
+    if (webkitGstCheckVersion(1, 18, 0))
+        RELEASE_ASSERT(isVideo);
+    else if (!isVideo)
+        return;
+
     GstElement* sink = makeGStreamerElement("appsink", nullptr);
     static GstAppSinkCallbacks callbacks = {
         nullptr,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to