summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2022-10-01 04:41:06 +1000
committerTim-Philipp Müller <tim@centricular.com>2022-10-08 10:42:59 +0100
commit2a683372bc5facbe8eb09a58a1897410fcdf2414 (patch)
tree2d9564fa8cb1636ae86fcced8d2daba36c7915ab
parent32e175026fe1a3e9643ce2d53b1daab3328bdb1b (diff)
decodebin3: Make sure event is writable before modifying
Make sure we're operating on a private copy of an event when modifying it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3146>
-rw-r--r--subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c
index 9b3ade7bf7..ad4ff2a56f 100644
--- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c
+++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c
@@ -1941,8 +1941,11 @@ multiqueue_src_probe (GstPad * pad, GstPadProbeInfo * info,
if (gst_mini_object_get_qdata (GST_MINI_OBJECT_CAST (ev),
CUSTOM_EOS_QUARK)) {
/* remove custom-eos */
+ ev = gst_event_make_writable (ev);
+ GST_PAD_PROBE_INFO_DATA (info) = ev;
gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (ev),
CUSTOM_EOS_QUARK, NULL, NULL);
+
GST_LOG_OBJECT (pad, "Received custom EOS");
ret = GST_PAD_PROBE_HANDLED;
SELECTION_LOCK (dbin);
@@ -1995,6 +1998,10 @@ multiqueue_src_probe (GstPad * pad, GstPadProbeInfo * info,
dbin->slots = g_list_remove (dbin->slots, slot);
SELECTION_UNLOCK (dbin);
+ /* FIXME: Removing the slot is async, which means actually
+ * unlinking the pad is async. Other things like stream-start
+ * might flow through this (now unprobed) link before it actually
+ * gets released */
free_multiqueue_slot_async (dbin, slot);
ret = GST_PAD_PROBE_REMOVE;
} else if (gst_mini_object_get_qdata (GST_MINI_OBJECT_CAST (ev),