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.
This commit is contained in:
Wim Taymans 2012-04-11 12:00:10 +02:00
parent e3ca88ea7b
commit 463a8d9abf

View 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_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);
}