1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avformat/aviobuf: Check for ffio_set_buf_size() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-07 14:57:36 +02:00
parent dc55477a64
commit 0023ea4e20

View File

@ -465,7 +465,9 @@ static void fill_buffer(AVIOContext *s)
/* make buffer smaller in case it ended up large after probing */ /* make buffer smaller in case it ended up large after probing */
if (s->read_packet && s->orig_buffer_size && s->buffer_size > s->orig_buffer_size) { if (s->read_packet && s->orig_buffer_size && s->buffer_size > s->orig_buffer_size) {
if (dst == s->buffer) { if (dst == s->buffer) {
ffio_set_buf_size(s, s->orig_buffer_size); int ret = ffio_set_buf_size(s, s->orig_buffer_size);
if (ret < 0)
av_log(s, AV_LOG_WARNING, "Failed to decrease buffer size\n");
s->checksum_ptr = dst = s->buffer; s->checksum_ptr = dst = s->buffer;
} }