adaptivedemux2: Recheck for a pending track on drain

When a track is completely drained and EOS, but
there's a pending track on the slot loop again
to switch to that track.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2838>
This commit is contained in:
Jan Schmidt 2022-07-01 02:07:05 +10:00 committed by Tim-Philipp Müller
parent f33fe73bb7
commit e89d84a178

View file

@ -3657,6 +3657,15 @@ restart:
/* This should only happen if the track is EOS, or exactly in between /* This should only happen if the track is EOS, or exactly in between
* the parser outputting segment/caps before buffers. */ * the parser outputting segment/caps before buffers. */
g_assert (track->eos || !slot->pushed_timed_data); g_assert (track->eos || !slot->pushed_timed_data);
/* If we drained the track, but there's a pending track on the slot
* loop again to activate it */
if (slot->pending_track) {
GST_DEBUG_OBJECT (demux,
"Track '%s' (period %u) drained, but has a pending track to activate",
track->stream_id, track->period_num);
goto restart;
}
break; break;
} }