mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
queue2: Count the number of buffers in a buffer list for updating the current levels
instead of just assuming one buffer.
This commit is contained in:
parent
10f038d4fb
commit
927666642e
1 changed files with 2 additions and 2 deletions
|
@ -2029,7 +2029,7 @@ gst_queue2_locked_enqueue (GstQueue2 * queue, gpointer item,
|
|||
|
||||
/* add buffer to the statistics */
|
||||
if (QUEUE_IS_USING_QUEUE (queue)) {
|
||||
queue->cur_level.buffers++;
|
||||
queue->cur_level.buffers += gst_buffer_list_length (buffer_list);
|
||||
queue->cur_level.bytes += size;
|
||||
}
|
||||
queue->bytes_in += size;
|
||||
|
@ -2222,7 +2222,7 @@ gst_queue2_locked_dequeue (GstQueue2 * queue, GstQueue2ItemType * item_type)
|
|||
"retrieved buffer list %p from queue", buffer_list);
|
||||
|
||||
if (QUEUE_IS_USING_QUEUE (queue)) {
|
||||
queue->cur_level.buffers--;
|
||||
queue->cur_level.buffers -= gst_buffer_list_length (buffer_list);
|
||||
queue->cur_level.bytes -= size;
|
||||
}
|
||||
queue->bytes_out += size;
|
||||
|
|
Loading…
Reference in a new issue