summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-04-13 04:02:51 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-04-13 04:02:51 +0000
commitb3eab9fb6455e8520282d78d68713e5e6a08b650 (patch)
treea1da3dc0ac43cbef4ee44ee43eca9fe76e26cb1f /libavformat/aviobuf.c
parent3321cb3f6e02954887797e67021ed48c1e108795 (diff)
seek inside buffer when offset is exactly at the end, fix seeking with memory ByteIOContext
Originally committed as revision 18487 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aviobuf.c')
-rw-r--r--libavformat/aviobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 93efd65d0b..f270139a9b 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -148,7 +148,7 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)
}
offset1 = offset - pos;
if (!s->must_flush &&
- offset1 >= 0 && offset1 < (s->buf_end - s->buffer)) {
+ 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 &&