From b691aece65bb5b707a45f47db7a28042db0b9a40 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 11 Oct 2022 03:20:11 +1100 Subject: [PATCH] adaptivedemux2: Hold tracks lock accessing input_period The input_period is protected by the TRACKS_LOCK, so make sure to hold that when accessing it. Part-of: --- .../gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c index f4ff4d5f74..f154aee5eb 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c @@ -2942,6 +2942,9 @@ gst_adaptive_demux_stop_tasks (GstAdaptiveDemux * demux, gboolean stop_updates) gst_adaptive_demux_stop_manifest_update_task (demux); TRACKS_LOCK (demux); + if (demux->input_period) + gst_adaptive_demux_period_stop_tasks (demux->input_period); + demux->priv->flushing = TRUE; g_cond_signal (&demux->priv->tracks_add); gst_task_stop (demux->priv->output_task); @@ -2949,9 +2952,6 @@ gst_adaptive_demux_stop_tasks (GstAdaptiveDemux * demux, gboolean stop_updates) gst_task_join (demux->priv->output_task); - if (demux->input_period) - gst_adaptive_demux_period_stop_tasks (demux->input_period); - demux->priv->qos_earliest_time = GST_CLOCK_TIME_NONE; }