mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 13:11:06 +00:00
clocksync: Fix deadlock because of taken stream lock on flush-start
Deadlock happens when streaming thread is already blocked by downstream and clocksync is trying to take stream lock on flush-start. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4772>
This commit is contained in:
parent
4aa3718c2d
commit
a1c2df830b
1 changed files with 1 additions and 5 deletions
|
@ -609,17 +609,13 @@ gst_clock_sync_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
gst_clock_id_unschedule (clocksync->clock_id);
|
gst_clock_id_unschedule (clocksync->clock_id);
|
||||||
}
|
}
|
||||||
GST_OBJECT_UNLOCK (clocksync);
|
GST_OBJECT_UNLOCK (clocksync);
|
||||||
|
|
||||||
GST_PAD_STREAM_LOCK (pad);
|
|
||||||
gst_clock_sync_reset_qos (clocksync);
|
|
||||||
GST_PAD_STREAM_UNLOCK (pad);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
GST_OBJECT_LOCK (clocksync);
|
GST_OBJECT_LOCK (clocksync);
|
||||||
clocksync->flushing = FALSE;
|
clocksync->flushing = FALSE;
|
||||||
gst_segment_init (&clocksync->segment, GST_FORMAT_UNDEFINED);
|
gst_segment_init (&clocksync->segment, GST_FORMAT_UNDEFINED);
|
||||||
GST_OBJECT_UNLOCK (clocksync);
|
GST_OBJECT_UNLOCK (clocksync);
|
||||||
|
gst_clock_sync_reset_qos (clocksync);
|
||||||
clocksync->is_first = TRUE;
|
clocksync->is_first = TRUE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue