From a1c2df830ba65eb085c45a94e57ac951bd7c6487 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Mon, 5 Jun 2023 20:17:40 +0900 Subject: [PATCH] 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: --- subprojects/gstreamer/plugins/elements/gstclocksync.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/subprojects/gstreamer/plugins/elements/gstclocksync.c b/subprojects/gstreamer/plugins/elements/gstclocksync.c index bdf99adc0e..2fe1610230 100644 --- a/subprojects/gstreamer/plugins/elements/gstclocksync.c +++ b/subprojects/gstreamer/plugins/elements/gstclocksync.c @@ -609,17 +609,13 @@ gst_clock_sync_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) gst_clock_id_unschedule (clocksync->clock_id); } GST_OBJECT_UNLOCK (clocksync); - - GST_PAD_STREAM_LOCK (pad); - gst_clock_sync_reset_qos (clocksync); - GST_PAD_STREAM_UNLOCK (pad); - break; case GST_EVENT_FLUSH_STOP: GST_OBJECT_LOCK (clocksync); clocksync->flushing = FALSE; gst_segment_init (&clocksync->segment, GST_FORMAT_UNDEFINED); GST_OBJECT_UNLOCK (clocksync); + gst_clock_sync_reset_qos (clocksync); clocksync->is_first = TRUE; break; default: