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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2684>
This commit is contained in:
Jan Schmidt 2022-06-29 00:51:28 +10:00 committed by Tim-Philipp Müller
parent a369448b0c
commit 0af4a53bc2

View file

@ -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)