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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5766>
This commit is contained in:
Vivia Nikolaidou 2023-12-05 14:01:50 +02:00 committed by GStreamer Marge Bot
parent 37ba866d52
commit e451908a27

View file

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