queue2: make range on newsegment for ringbuffer
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 10 Apr 2012 09:16:14 +0000 (11:16 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 10 Apr 2012 10:44:30 +0000 (12:44 +0200)
When using the ringbuffer, handle the newsegment event like we handle it when
using the temp-file mode: create a new range for the new byte segment. The new
segment should normally already be created when we do a seek.

plugins/elements/gstqueue2.c

index 77f68d9..548d99a 100644 (file)
@@ -740,7 +740,7 @@ apply_segment (GstQueue2 * queue, GstEvent * event, GstSegment * segment,
       G_GINT64_FORMAT, update, rate, arate, format, start, stop, time);
 
   if (format == GST_FORMAT_BYTES) {
-    if (QUEUE_IS_USING_TEMP_FILE (queue)) {
+    if (!QUEUE_IS_USING_QUEUE (queue)) {
       /* start is where we'll be getting from and as such writing next */
       queue->current = add_range (queue, start);
       /* update the stats for this range */