[FFmpeg-cvslog] avformat/aviobuf: Check for ffio_set_buf_size() failure
Michael Niedermayer
git at videolan.org
Sun Jun 7 15:23:33 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 7 14:57:36 2015 +0200| [0023ea4e20b0bec70e1dedb7f1183dd58f9122d8] | committer: Michael Niedermayer
avformat/aviobuf: Check for ffio_set_buf_size() failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0023ea4e20b0bec70e1dedb7f1183dd58f9122d8
---
libavformat/aviobuf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
index aad97ae..45400cd 100644
--- a/libavformat/aviobuf.c
+++ b/libavformat/aviobuf.c
@@ -465,7 +465,9 @@ static void fill_buffer(AVIOContext *s)
/* 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 (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;
}
More information about the ffmpeg-cvslog
mailing list