mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
aggregator: Resume srcpad task on stream-start only when running
Race condition without this patch: - srcpad task is being stopped in gst_aggregator_stop_srcpad_task() - at that moment, in pre-queue event handler, gst_pad_get_task_state() returned GST_TASK_PAUSED - then in srcpad task got stopped in gst_aggregator_stop_srcpad_task() - finally srcpad task got resumed in pre-queue event handler To address it, checks "running" flag in pre-queue event handler. Both pre-queue stream-start event handler and "running" flag are protected by SRC_LOCK already. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4847>
This commit is contained in:
parent
842805d7c6
commit
513d897d6e
1 changed files with 1 additions and 1 deletions
|
@ -1927,7 +1927,7 @@ gst_aggregator_default_sink_event_pre_queue (GstAggregator * self,
|
|||
SRC_LOCK (self);
|
||||
PAD_LOCK (aggpad);
|
||||
|
||||
if (event_type == GST_EVENT_STREAM_START) {
|
||||
if (event_type == GST_EVENT_STREAM_START && priv->running) {
|
||||
GstTaskState task_state;
|
||||
aggpad->priv->flow_return = GST_FLOW_OK;
|
||||
|
||||
|
|
Loading…
Reference in a new issue