queue2: post 100% buffering message even when waiting for space to be freed
authorArnaud Vrac <avrac@freebox.fr>
Wed, 21 Feb 2024 11:20:19 +0000 (12:20 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 26 Feb 2024 18:53:08 +0000 (18:53 +0000)
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>

subprojects/gstreamer/plugins/elements/gstqueue2.c

index 6c8be5feb1013b8c9612477c61bccb43691d27c9..999c231d149c682d2995b0eae9edcedba5ab8445 100644 (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;