ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Mon Apr 27 
04:52:01 2015 +0200| [46778ab212e25f28a942628b4f9f959c59d2ad26] | committer: 
Michael Niedermayer

avformat/aviobuf: Do not resize the buffer in ffio_ensure_seekback() if there 
is no read function

Without a read function there can never be more data read than the buffer could
hold

Signed-off-by: Michael Niedermayer <michae...@gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46778ab212e25f28a942628b4f9f959c59d2ad26
---

 libavformat/aviobuf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index 7de59f1..333c75c 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -805,7 +805,7 @@ int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size)
 
     buf_size += s->buf_ptr - s->buffer + max_buffer_size;
 
-    if (buf_size < filled || s->seekable)
+    if (buf_size < filled || s->seekable || !s->read_packet)
         return 0;
     av_assert0(!s->write_flag);
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to