queue2: set buffering mode correctly

This commit is contained in:
Wim Taymans 2010-06-16 12:00:30 +02:00
parent cb6d9b071e
commit 7de963c0e0

View file

@ -798,7 +798,11 @@ update_buffering (GstQueue2 * queue)
GstFormat fmt = GST_FORMAT_BYTES; GstFormat fmt = GST_FORMAT_BYTES;
gint64 duration; gint64 duration;
mode = GST_BUFFERING_DOWNLOAD; if (QUEUE_IS_USING_RING_BUFFER (queue))
mode = GST_BUFFERING_TIMESHIFT;
else
mode = GST_BUFFERING_DOWNLOAD;
if (queue->byte_in_rate > 0) { if (queue->byte_in_rate > 0) {
if (gst_pad_query_peer_duration (queue->sinkpad, &fmt, &duration)) if (gst_pad_query_peer_duration (queue->sinkpad, &fmt, &duration))
buffering_left = buffering_left =