Skip to content

Commit

Permalink
appsrc: Correctly check if this is the first buffer that was queued
Browse files Browse the repository at this point in the history
By checking the queue length this would also count events and caps. We
already keep track of the number of buffers separately so just use that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1197>
  • Loading branch information
sdroege committed Jun 8, 2021
1 parent d1fa109 commit 0b9976a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gst-libs/gst/app/gstappsrc.c
Expand Up @@ -1501,7 +1501,7 @@ gst_app_src_update_queued_push (GstAppSrc * appsrc, GstMiniObject * item)
* here. This is especially useful if this was the first buffer because
* otherwise we would have to wait until it is actually unqueued to know
* the queued duration */
if (gst_queue_array_get_length (priv->queue) == 1) {
if (priv->queued_buffers == 1) {
if (priv->last_segment.stop != -1
&& start_buffer_ts > priv->last_segment.stop)
start_buffer_ts = priv->last_segment.stop;
Expand Down

0 comments on commit 0b9976a

Please sign in to comment.