From e451908a27105dd9e7ca34e190465eb641e2df53 Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Tue, 5 Dec 2023 14:01:50 +0200 Subject: [PATCH] multiqueue: Don't stop dropping when an internal queue is empty It is racy and may cause us to accidentally keep forwarding data past the EOS. The only reason to stop dropping would be when we encounter a stream-start, segment, or segment-done event, either in push_one (already queued) or in the sink pad's event function. Part-of: --- subprojects/gstreamer/plugins/elements/gstmultiqueue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/subprojects/gstreamer/plugins/elements/gstmultiqueue.c b/subprojects/gstreamer/plugins/elements/gstmultiqueue.c index c9a0afb5a8..535272fd1c 100644 --- a/subprojects/gstreamer/plugins/elements/gstmultiqueue.c +++ b/subprojects/gstreamer/plugins/elements/gstmultiqueue.c @@ -2394,11 +2394,9 @@ next: /* pretend we have not seen EOS yet for upstream's sake */ result = sq->srcresult; } else if (dropping && gst_data_queue_is_empty (sq->queue)) { - /* queue empty, so stop dropping - * we can commit the result we have now, + /* queue empty. we can commit the result we have now, * which is either OK after a segment, or EOS */ GST_DEBUG_ID (sq->debug_id, "committed EOS drop"); - dropping = FALSE; result = GST_FLOW_EOS; } sq->srcresult = result;