# HG changeset patch # User benoit # Date 1269427318 0 # Node ID 6a24c2ae6ee4d4ea7f25535cb8a6e21c0a1aab2f # Parent e3fb53259d866a37f6826f808ccd59ca04901ebd Mask away AVSEEK_FORCE properly in some checks in url_fseek() Patch by Tomas H¸«£rdin $(name).$(s/¸«£/a/ $(surname)) AT codemill DOT se diff -r e3fb53259d86 -r 6a24c2ae6ee4 aviobuf.c --- a/aviobuf.c Tue Mar 23 23:58:45 2010 +0000 +++ b/aviobuf.c Wed Mar 24 10:41:58 2010 +0000 @@ -130,6 +130,8 @@ { int64_t offset1; int64_t pos; + int force = whence & AVSEEK_FORCE; + whence &= ~AVSEEK_FORCE; if(!s) return AVERROR(EINVAL); @@ -151,8 +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) - || (whence & AVSEEK_FORCE))){ + (offset1 < (s->buf_end - s->buffer) + (1<<16) || force)) { while(s->pos < offset && !s->eof_reached) fill_buffer(s); if (s->eof_reached)