queue2: post 100% buffering message even when waiting for space to be freed

In the case where the queue shrinks due to a property change and the queue
becomes full, we would set the waiting_del flag, which would prevent posting the
100% buffering message on the bus. Since the pipeline is not aware of the new
buffering value, in the common case where the pipeline is paused during
buffering, it would never resume.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
This commit is contained in:
Arnaud Vrac 2024-02-21 12:20:19 +01:00 committed by GStreamer Marge Bot
parent 7293c313d4
commit 49fa99737b

View file

@ -1193,7 +1193,7 @@ gst_queue2_post_buffering (GstQueue2 * queue)
/* FIXME: This situation above can still occur later if
* the sink pad is waiting to push a serialized event into the queue and
* the queue becomes empty for a short period of time. */
if (!queue->waiting_del
if ((!queue->waiting_del || queue->buffering_percent == 100)
&& queue->last_posted_buffering_percent != queue->buffering_percent) {
percent = queue->buffering_percent;