From 463a8d9abf26969e44b2b146802d19802f7c06aa Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 11 Apr 2012 12:00:10 +0200 Subject: [PATCH] queue2: add range only on sinkpad Only add the range when we receive a segment event on the sinkpad. The add_range method will modify the write position, which only makes sense to do on the sinkpad. --- plugins/elements/gstqueue2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index c5a8cb5..a861fb7 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -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_QUEUE (queue)) { + if (!QUEUE_IS_USING_QUEUE (queue) && is_sink) { /* start is where we'll be getting from and as such writing next */ queue->current = add_range (queue, start); } -- 2.7.4