queue2: don't wait for data when EOS

When in download mode and we need to provide data for an offset that we don't
have, also perform a seek to the requested location when we are EOS. The reason
why we shouldn't wait for more data is because after EOS, there simply will be
no more data and we end up waiting forever.

Fixes #620500
This commit is contained in:
Wim Taymans 2010-06-07 10:16:04 +02:00
parent 28fdbee35a
commit 15141b3954

View file

@ -1051,7 +1051,7 @@ gst_queue2_have_data (GstQueue2 * queue, guint64 offset, guint length)
GST_INFO_OBJECT (queue, "not found in any range"); GST_INFO_OBJECT (queue, "not found in any range");
/* we don't have the range, see how far away we are, FIXME, find a good /* we don't have the range, see how far away we are, FIXME, find a good
* threshold based on the incomming rate. */ * threshold based on the incomming rate. */
if (queue->current) { if (!queue->is_eos && queue->current) {
if (offset < queue->current->writing_pos + 200000) { if (offset < queue->current->writing_pos + 200000) {
update_cur_pos (queue, queue->current, offset + length); update_cur_pos (queue, queue->current, offset + length);
GST_INFO_OBJECT (queue, "wait for data"); GST_INFO_OBJECT (queue, "wait for data");