[FFmpeg-cvslog] avformat/ffmdec: Check ffio_set_buf_size() return value

Michael Niedermayer git at videolan.org
Wed Jun 17 22:09:33 CEST 2015


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Sun Jun  7 14:55:10 2015 +0200| [78ef1be8e12e04dec3ea141047bc3a34ba58fd83] | committer: Michael Niedermayer

avformat/ffmdec: Check ffio_set_buf_size() return value

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit dc55477a64cefebf8dcc611f026be71382814ae2)

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

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

 libavformat/ffmdec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 338a850..ed5663f 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -95,7 +95,9 @@ static int ffm_read_data(AVFormatContext *s,
     retry_read:
             if (pb->buffer_size != ffm->packet_size) {
                 int64_t tell = avio_tell(pb);
-                ffio_set_buf_size(pb, ffm->packet_size);
+                int ret = ffio_set_buf_size(pb, ffm->packet_size);
+                if (ret < 0)
+                    return ret;
                 avio_seek(pb, tell, SEEK_SET);
             }
             id = avio_rb16(pb); /* PACKET_ID */



More information about the ffmpeg-cvslog mailing list