diff aviobuf.c @ 5942:b106b59bf663 libavformat

Seeking forward in non-seekable media by discarding data, regardless of how far to seek. Won't SEEK_END unless forced though.
author thardin
date Thu, 08 Apr 2010 09:47:32 +0000
parents bde9a4b67f86
children dc1a033edd9f
line wrap: on
line diff
--- a/aviobuf.c	Thu Apr 08 09:02:27 2010 +0000
+++ b/aviobuf.c	Thu Apr 08 09:47:32 2010 +0000
@@ -153,7 +153,7 @@
         /* can do the seek inside the buffer */
         s->buf_ptr = s->buffer + offset1;
     } 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)
             fill_buffer(s);
         if (s->eof_reached)