From 0af4a53bc25cbe848ce485ee5a92f6fb8043d804 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Wed, 29 Jun 2022 00:51:28 +1000 Subject: [PATCH] adaptivedemux2: Ignore stopped stream flow state When calculating the combined stream flow state for a period, don't consider stopped streams. Fixes switching to the next period in DASH streams with multiple video/audio/subtitle streams. Part-of: --- .../gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-period.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-period.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-period.c index 7c1fc3f..405631e 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-period.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-period.c @@ -239,6 +239,11 @@ gst_adaptive_demux_period_combine_stream_flows (GstAdaptiveDemuxPeriod * period) for (iter = period->streams; iter; iter = g_list_next (iter)) { GstAdaptiveDemux2Stream *stream = iter->data; + /* Streams that are not running do not contribute + * to the flow */ + if (stream->state == GST_ADAPTIVE_DEMUX2_STREAM_STATE_STOPPED) + continue; + if (stream->last_ret != GST_FLOW_NOT_LINKED) { all_notlinked = FALSE; if (stream->last_ret != GST_FLOW_EOS) -- 2.7.4