From aae7b5416c8a6e873467368ea0dc70a89dc3c9d0 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 1 Oct 2022 04:41:06 +1000 Subject: [PATCH] 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: --- subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c index 32e8ee4..0497f3e 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c @@ -2032,8 +2032,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); @@ -2086,6 +2089,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), -- 2.7.4