summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-27 04:52:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-27 05:06:36 +0200
commit46778ab212e25f28a942628b4f9f959c59d2ad26 (patch)
tree59b2384cb32f3d01821b4dbd4ecfe9031f7c5f9d /libavformat/aviobuf.c
parent0ace686ae8543750165d423adfe9249f3ce4c235 (diff)
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 <michaelni@gmx.at>
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 7de59f10f3..333c75ce66 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);