changeset 4871:37da30baa62d libavformat

seek inside buffer when offset is exactly at the end, fix seeking with memory ByteIOContext
author bcoudurier
date Mon, 13 Apr 2009 04:02:51 +0000
parents f35f6f0b7fe7
children 304a0ea063f0
files aviobuf.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aviobuf.c	Mon Apr 13 03:38:55 2009 +0000
+++ b/aviobuf.c	Mon Apr 13 04:02:51 2009 +0000
@@ -148,7 +148,7 @@
     }
     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 &&