diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-07 15:55:10 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-20 05:43:39 +0300 |
commit | e21db6e3399ff875828a51d028a4e55814ca09f6 (patch) | |
tree | 09c8388017db70ac3d6c0300020b5d0b1f5f981d | |
parent | e354ec95d6bbf602e16f71b2c72c22c77666150c (diff) |
avformat/ffmdec: Check ffio_set_buf_size() return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc55477a64cefebf8dcc611f026be71382814ae2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/ffmdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 33bbde04b0..57df43b912 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -98,7 +98,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 */ |