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
This commit is contained in:
Michael Niedermayer 2010-03-15 22:54:22 +00:00
parent 53f66cee0c
commit 493f54ada0
3 changed files with 12 additions and 3 deletions

View file

@ -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)