WebKit Bugzilla
Attachment 341264 Details for
Bug 185948
: [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[GStreamer] Add qtdemux patches to fix use of NULL pointers
GStreamer-Add-qtdemux-patches-to-fix-use-of-NULL-p.patch (text/plain), 6.12 KB, created by
Thibault Saunier
on 2018-05-25 02:13:04 PDT
(
hide
)
Description:
[GStreamer] Add qtdemux patches to fix use of NULL pointers
Filename:
MIME Type:
Creator:
Thibault Saunier
Created:
2018-05-25 02:13:04 PDT
Size:
6.12 KB
patch
obsolete
>From d9f98bdd6074a00d492addb81aff736db69d15a4 Mon Sep 17 00:00:00 2001 >From: Thibault Saunier <tsaunier@igalia.com> >Date: Fri, 25 May 2018 11:05:05 +0200 >Subject: [PATCH xserver] [GStreamer] Add qtdemux patches to fix use of NULL > pointers > >https://bugs.webkit.org/show_bug.cgi?id=185948 >--- > Tools/ChangeLog | 15 +++++++++ > Tools/gstreamer/jhbuild.modules | 2 ++ > ...un-the-preferred-decryptor-context-q.patch | 33 +++++++++++++++++++ > ...emux-Do-not-unref-a-NULL-stream_tags.patch | 30 +++++++++++++++++ > 4 files changed, 80 insertions(+) > create mode 100644 Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch > create mode 100644 Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 645f70cdc55..ff78a695c81 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-25 Thibault Saunier <tsaunier@igalia.com> >+ >+ [GStreamer] Add qtdemux patches to fix use of NULL pointers >+ https://bugs.webkit.org/show_bug.cgi?id=185948 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When the patch introducing gst_protection_filter_systems_by_available_decryptors was merged, we changed sensibly its behaviour >+ concerning the way empty results is represented (now returning NULL instead of an array of 1(NULL) element) and this change was not >+ properly taken into account in the qtdemux patch that uses it and got upstreamed. Those 2 new patches fixes that. >+ >+ * gstreamer/jhbuild.modules: >+ * gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch: Added. Merged upstream as 3e063703b3a51b8aaa7f75f36c4660c583a60e93 >+ * gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch: Added. Merged upstream as 43a540b1cd9f162d3dae5d50e36703dfaf558a3e >+ > 2018-05-24 Chris Dumez <cdumez@apple.com> > > Reduce copying of FontCascadeDescription objects by moving them around >diff --git a/Tools/gstreamer/jhbuild.modules b/Tools/gstreamer/jhbuild.modules >index 4b91a84bc96..8e300bfc0f2 100644 >--- a/Tools/gstreamer/jhbuild.modules >+++ b/Tools/gstreamer/jhbuild.modules >@@ -69,6 +69,8 @@ > <branch hash="sha:34ec062ddb766a32377532e039781f4a16fbc3e8b449e642605bacab26a99172" module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" repo="gstreamer" version="1.14.1"> > <patch file="gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch" strip="1" /> <!-- Merged as ee4b45da24cb7465b416c230597f8efc7b2c45cb --> > <patch file="gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch" strip="1" /> <!-- Merged as 844423ff99e281fc831303b92861ed43ce5c1518 --> >+ <patch file="gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch" strip="1" /> <!-- Merged as 3e063703b3a51b8aaa7f75f36c4660c583a60e93 --> >+ <patch file="gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch" strip="1" /> <!-- Merged as 43a540b1cd9f162d3dae5d50e36703dfaf558a3e --> > </branch> > </autotools> > >diff --git a/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch b/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch >new file mode 100644 >index 00000000000..567721ea0bf >--- /dev/null >+++ b/Tools/gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch >@@ -0,0 +1,33 @@ >+From 3e063703b3a51b8aaa7f75f36c4660c583a60e93 Mon Sep 17 00:00:00 2001 >+From: Thibault Saunier <tsaunier@igalia.com> >+Date: Fri, 25 May 2018 10:17:29 +0200 >+Subject: [PATCH 1/2] qtdemux: Do not run the preferred decryptor context query >+ if no decryptor avalaible >+ >+Ultimately this avoids a segfault as the code expect a non NULL array >+here. >+--- >+ gst/isomp4/qtdemux.c | 7 +++++++ >+ 1 file changed, 7 insertions(+) >+ >+diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c >+index 3e8ce7860..ec4a8adfd 100644 >+--- a/gst/isomp4/qtdemux.c >++++ b/gst/isomp4/qtdemux.c >+@@ -8056,6 +8056,13 @@ gst_qtdemux_request_protection_context (GstQTDemux * qtdemux, >+ g_ptr_array_add (qtdemux->protection_system_ids, NULL); >+ filtered_sys_ids = gst_protection_filter_systems_by_available_decryptors ( >+ (const gchar **) qtdemux->protection_system_ids->pdata); >++ >++ if (!filtered_sys_ids) { >++ GST_INFO_OBJECT (element, >++ "No avalaible decryptor, not worth asking the user to choose."); >++ return; >++ } >++ >+ g_ptr_array_remove_index (qtdemux->protection_system_ids, >+ qtdemux->protection_system_ids->len - 1); >+ GST_TRACE_OBJECT (qtdemux, "detected %u protection systems, we have " >+-- >+2.17.0 >+ >diff --git a/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch b/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch >new file mode 100644 >index 00000000000..2acb9b0dd6a >--- /dev/null >+++ b/Tools/gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch >@@ -0,0 +1,30 @@ >+From 43a540b1cd9f162d3dae5d50e36703dfaf558a3e Mon Sep 17 00:00:00 2001 >+From: Thibault Saunier <tsaunier@igalia.com> >+Date: Fri, 25 May 2018 10:49:21 +0200 >+Subject: [PATCH 2/2] qtdemux: Do not unref a NULL stream_tags >+ >+stream->stream_tags is reset to NULL once we expose the stream and >+these have been consumed, we need to check that when cleaning up >+the stream. >+--- >+ gst/isomp4/qtdemux.c | 4 +++- >+ 1 file changed, 3 insertions(+), 1 deletion(-) >+ >+diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c >+index ec4a8adfd..4116f4c69 100644 >+--- a/gst/isomp4/qtdemux.c >++++ b/gst/isomp4/qtdemux.c >+@@ -2600,7 +2600,9 @@ gst_qtdemux_stream_clear (QtDemuxStream * stream) >+ entry->sparse = FALSE; >+ } >+ >+- gst_tag_list_unref (stream->stream_tags); >++ if (stream->stream_tags) >++ gst_tag_list_unref (stream->stream_tags); >++ >+ stream->stream_tags = gst_tag_list_new_empty (); >+ gst_tag_list_set_scope (stream->stream_tags, GST_TAG_SCOPE_STREAM); >+ g_free (stream->redirect_uri); >+-- >+2.17.0 >+ >-- >2.17.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185948
:
341199
|
341264
|
341271
|
341282
|
341290