Commit 7a6fe01f authored by Tomas Härdin's avatar Tomas Härdin

Seeking forward in non-seekable media by discarding data, regardless of how...

Seeking forward in non-seekable media by discarding data, regardless of how far to seek. Won't SEEK_END unless forced though.

Originally committed as revision 22822 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 01d91b9b
...@@ -153,7 +153,7 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence) ...@@ -153,7 +153,7 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)
/* can do the seek inside the buffer */ /* can do the seek inside the buffer */
s->buf_ptr = s->buffer + offset1; s->buf_ptr = s->buffer + offset1;
} else if(s->is_streamed && !s->write_flag && offset1 >= 0 && } else if(s->is_streamed && !s->write_flag && offset1 >= 0 &&
(offset1 < (s->buf_end - s->buffer) + (1<<16) || force)) { (whence != SEEK_END || force)) {
while(s->pos < offset && !s->eof_reached) while(s->pos < offset && !s->eof_reached)
fill_buffer(s); fill_buffer(s);
if (s->eof_reached) if (s->eof_reached)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment