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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3107>
This commit is contained in:
Jan Schmidt 2022-10-01 04:40:09 +10:00 committed by GStreamer Marge Bot
parent e5828c8295
commit bf6d30ed79

View file

@ -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,