queue2: stop waiting for more data after EOS
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 5 Apr 2012 08:03:02 +0000 (10:03 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 5 Apr 2012 08:17:46 +0000 (10:17 +0200)
When we have EOS, read the remaining bytes in the buffer and make sure we don't
wait for more data. Also clip the output buffer to the amount of remaining
bytes.

plugins/elements/gstqueue2.c

index b011cd3..02fd10a 100644 (file)
@@ -1292,6 +1292,8 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length,
                 "EOS hit but read %" G_GUINT64_FORMAT " bytes that we have",
                 level);
             read_length = level;
+            remaining = level;
+            length = level;
           } else {
             GST_DEBUG_OBJECT (queue,
                 "EOS hit and we don't have any requested data");