mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
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>
This commit is contained in:
parent
32e175026f
commit
2a683372bc
1 changed files with 7 additions and 0 deletions
|
@ -1941,8 +1941,11 @@ multiqueue_src_probe (GstPad * pad, GstPadProbeInfo * info,
|
||||||
if (gst_mini_object_get_qdata (GST_MINI_OBJECT_CAST (ev),
|
if (gst_mini_object_get_qdata (GST_MINI_OBJECT_CAST (ev),
|
||||||
CUSTOM_EOS_QUARK)) {
|
CUSTOM_EOS_QUARK)) {
|
||||||
/* remove custom-eos */
|
/* 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),
|
gst_mini_object_set_qdata (GST_MINI_OBJECT_CAST (ev),
|
||||||
CUSTOM_EOS_QUARK, NULL, NULL);
|
CUSTOM_EOS_QUARK, NULL, NULL);
|
||||||
|
|
||||||
GST_LOG_OBJECT (pad, "Received custom EOS");
|
GST_LOG_OBJECT (pad, "Received custom EOS");
|
||||||
ret = GST_PAD_PROBE_HANDLED;
|
ret = GST_PAD_PROBE_HANDLED;
|
||||||
SELECTION_LOCK (dbin);
|
SELECTION_LOCK (dbin);
|
||||||
|
@ -1995,6 +1998,10 @@ multiqueue_src_probe (GstPad * pad, GstPadProbeInfo * info,
|
||||||
dbin->slots = g_list_remove (dbin->slots, slot);
|
dbin->slots = g_list_remove (dbin->slots, slot);
|
||||||
SELECTION_UNLOCK (dbin);
|
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);
|
free_multiqueue_slot_async (dbin, slot);
|
||||||
ret = GST_PAD_PROBE_REMOVE;
|
ret = GST_PAD_PROBE_REMOVE;
|
||||||
} else if (gst_mini_object_get_qdata (GST_MINI_OBJECT_CAST (ev),
|
} else if (gst_mini_object_get_qdata (GST_MINI_OBJECT_CAST (ev),
|
||||||
|
|
Loading…
Reference in a new issue