[SCM] libav/experimental: seek inside buffer when offset is exactly at the end, fix seeking with memory ByteIOContext

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:44:02 UTC 2013


The following commit has been merged in the experimental branch:
commit b3eab9fb6455e8520282d78d68713e5e6a08b650
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Mon Apr 13 04:02:51 2009 +0000

    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

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 93efd65..f270139 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 &&

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list