mirror of https://git.ffmpeg.org/ffmpeg.git
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>
This commit is contained in:
parent
0ace686ae8
commit
46778ab212
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue