diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-03-15 22:54:22 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-03-15 22:54:22 +0000 |
commit | 493f54ada083b4d6c8f14f02607224fe258c211c (patch) | |
tree | 8f13732a9eff3e14888c4e79de4706b5aa06d321 /libavformat/aviobuf.c | |
parent | 53f66cee0cb99e6fad4c4d1c13153e6e8e9fd53b (diff) | |
download | ffmpeg-493f54ada083b4d6c8f14f02607224fe258c211c.tar.gz |
Add AVSEEK_FORCE flag to indicate that the code should attempt to seek
by any means.
Originally committed as revision 22557 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r-- | libavformat/aviobuf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 1cbed1d5e7..29d0715357 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -150,8 +150,9 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence) offset1 >= 0 && offset1 <= (s->buf_end - s->buffer)) { /* 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)){ + } else if(s->is_streamed && !s->write_flag && offset1 >= 0 && + ( offset1 < (s->buf_end - s->buffer) + (1<<16) + || (whence & AVSEEK_FORCE))){ while(s->pos < offset && !s->eof_reached) fill_buffer(s); if (s->eof_reached) |