[FFmpeg-cvslog] r22653 - trunk/libavformat/aviobuf.c
benoit
subversion
Wed Mar 24 11:41:58 CET 2010
Author: benoit
Date: Wed Mar 24 11:41:58 2010
New Revision: 22653
Log:
Mask away AVSEEK_FORCE properly in some checks in url_fseek()
Patch by Tomas H?rdin $(name).$(s/?/a/ $(surname)) AT codemill DOT se
Modified:
trunk/libavformat/aviobuf.c
Modified: trunk/libavformat/aviobuf.c
==============================================================================
--- trunk/libavformat/aviobuf.c Wed Mar 24 00:58:45 2010 (r22652)
+++ trunk/libavformat/aviobuf.c Wed Mar 24 11:41:58 2010 (r22653)
@@ -130,6 +130,8 @@ int64_t url_fseek(ByteIOContext *s, int6
{
int64_t offset1;
int64_t pos;
+ int force = whence & AVSEEK_FORCE;
+ whence &= ~AVSEEK_FORCE;
if(!s)
return AVERROR(EINVAL);
@@ -151,8 +153,7 @@ int64_t url_fseek(ByteIOContext *s, int6
/* 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)
More information about the ffmpeg-cvslog
mailing list