aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2010-04-08 09:47:32 +0000
committerTomas Härdin <tomas.hardin@codemill.se>2010-04-08 09:47:32 +0000
commit7a6fe01f99cb95797ba59134f44b6666b1a5e792 (patch)
tree0b9a3c9a789bc66bb91e478baab18f72c6708953
parent01d91b9be978753803fa6f5e73b17ab9f03a5c7b (diff)
downloadffmpeg-7a6fe01f99cb95797ba59134f44b6666b1a5e792.tar.gz
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
-rw-r--r--libavformat/aviobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 43e62daff6..0bc874bc44 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -153,7 +153,7 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)
/* 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)