From bf6d30ed79c948c9a864b8288e8e7f8b32cb2d64 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sat, 1 Oct 2022 04:40:09 +1000 Subject: [PATCH] urisourcebin: Make sure event is writable before modifying. Make sure we're operating on a private copy of an event before modifying it. Part-of: --- subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c index c362779a95..67d1a27ed4 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c @@ -903,9 +903,13 @@ demux_pad_events (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) remove_buffering_msgs (urisrc, GST_OBJECT_CAST (child_info->output_slot->queue)); - /* Mark this custom EOS */ + /* Mark this custom EOS, replacing the event in the probe data */ + 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, (gchar *) CUSTOM_EOS_QUARK_DATA, NULL); + if (all_streams_eos) { GST_DEBUG_OBJECT (urisrc, "POSTING ABOUT TO FINISH"); g_signal_emit (urisrc,