From b1b29de0fb035146ce82513cc29d94d51e83bb34 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 28 Nov 2023 11:28:58 -0300 Subject: [PATCH] qtdemux: Do not mark stream as EOS only if all streams are EOS The `GstFlowCombiner` is responsible for tracking the flow of each stream and handle the overal flow return value. Without that, we can end up with the following scenario: - Audio+video stream - Only the video stream is linked downstream - The audio stream goes EOS, video doesn't yet -> We update the Flow in the combiner with OK as all streams are not EOS - Video goes EOS because downstream returned EOS -> `qtdemux` returns `FLOW_OK` forever because the unlinked audio pad has `last_flowret==FLOW_OK` Part-of: --- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index f774f9553d..bd7e0d6235 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -8463,14 +8463,7 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) gst_adapter_flush (demux->adapter, demux->neededbytes); demux->offset += demux->neededbytes; - /* check if all streams are eos */ ret = GST_FLOW_EOS; - for (i = 0; i < QTDEMUX_N_STREAMS (demux); i++) { - if (!STREAM_IS_EOS (QTDEMUX_NTH_STREAM (demux, i))) { - ret = GST_FLOW_OK; - break; - } - } } else { GstBuffer *outbuf;