Skip to content
Permalink
Browse files
[GStreamer] Another crash under gst_element_add_pad
https://bugs.webkit.org/show_bug.cgi?id=225765

Patch by Philippe Normand <pnormand@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):

Canonical link: https://commits.webkit.org/238834@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
philn authored and webkit-commit-queue committed Jun 15, 2021
1 parent 037d90e commit 51fb6ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
@@ -1,3 +1,17 @@
2021-06-15 Philippe Normand <pnormand@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 <darin@apple.com>

Delete some recently-obsoleted files
@@ -238,7 +238,15 @@ void ImageDecoderGStreamer::InnerDecoder::connectDecoderPad(GstPad* pad)
{
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 = {

0 comments on commit 51fb6ba

Please sign in to comment.