aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorTomas Härdin <Tomas.hardin@codemill.se>2010-03-24 10:41:58 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2010-03-24 10:41:58 +0000
commitc6a5e087cf619775c18386c48711b7aa5efe059e (patch)
treec12749a0808f3d475109c32e0b6e1ec0cf7a4521 /libavformat
parent06ebe9161e93c36af3faa0e852a3358cca4a2bc7 (diff)
downloadffmpeg-c6a5e087cf619775c18386c48711b7aa5efe059e.tar.gz
Mask away AVSEEK_FORCE properly in some checks in url_fseek()
Patch by Tomas Härdin $(name).$(s/ä/a/ $(surname)) AT codemill DOT se Originally committed as revision 22653 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/aviobuf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index da05251279..37a6f6dee3 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -130,6 +130,8 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)
{
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, int64_t offset, int whence)
/* 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)