urisourcebin: Don't hold lock when emitting about-to-finish

This could trigger actions that re-enter this element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7368>
This commit is contained in:
Edward Hervey 2024-08-16 14:25:53 +02:00 committed by GStreamer Marge Bot
parent 2caaf252b0
commit 7546975856

View file

@ -914,7 +914,6 @@ static GstPadProbeReturn
demux_pad_events (GstPad * pad, GstPadProbeInfo * info, OutputSlotInfo * slot)
{
GstURISourceBin *urisrc = slot->linked_info->urisrc;
GstPadProbeReturn ret = GST_PAD_PROBE_OK;
GstEvent *ev = GST_PAD_PROBE_INFO_EVENT (info);
GST_URI_SOURCE_BIN_LOCK (urisrc);
@ -941,13 +940,14 @@ demux_pad_events (GstPad * pad, GstPadProbeInfo * info, OutputSlotInfo * slot)
/* EOS means this element is no longer buffering */
remove_buffering_msgs (urisrc, GST_OBJECT_CAST (slot->queue));
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
if (all_streams_eos) {
GST_DEBUG_OBJECT (urisrc, "Posting about-to-finish");
g_signal_emit (urisrc,
gst_uri_source_bin_signals[SIGNAL_ABOUT_TO_FINISH], 0, NULL);
}
goto unlock_done;
}
break;
case GST_EVENT_STREAM_START:
{
/* This is a temporary hack to notify downstream decodebin3 to *not*
@ -973,7 +973,8 @@ demux_pad_events (GstPad * pad, GstPadProbeInfo * info, OutputSlotInfo * slot)
GST_URI_SOURCE_BIN_UNLOCK (urisrc);
return ret;
unlock_done:
return GST_PAD_PROBE_OK;
}
static GstPadProbeReturn