# HG changeset patch # User thardin # Date 1270720052 0 # Node ID b106b59bf663568f4bd3c7bc34d992c5991bab88 # Parent bde9a4b67f8606c6c101c06c03c5a495500a7cd2 Seeking forward in non-seekable media by discarding data, regardless of how far to seek. Won't SEEK_END unless forced though. diff -r bde9a4b67f86 -r b106b59bf663 aviobuf.c --- 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)