Mercurial > libavformat.hg
diff aviobuf.c @ 5850:a9a36b4f83a2 libavformat
Add AVSEEK_FORCE flag to indicate that the code should attempt to seek
by any means.
author | michael |
---|---|
date | Mon, 15 Mar 2010 22:54:22 +0000 |
parents | 26c471598b2f |
children | a1121e5fa662 |
line wrap: on
line diff
--- a/aviobuf.c Mon Mar 15 22:37:14 2010 +0000 +++ b/aviobuf.c Mon Mar 15 22:54:22 2010 +0000 @@ -150,8 +150,9 @@ 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)