diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-07 14:55:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 02:13:12 +0200 |
commit | 1fe67c9472adba37b0ac7c9b30cd9b8fa5c3ef3d (patch) | |
tree | 23231fec88b0fc8f276df1b8ebddd2ec4ec60bf3 | |
parent | 6fd4b2b84f603a0b5721ec1bc965abadb89095e8 (diff) | |
download | ffmpeg-1fe67c9472adba37b0ac7c9b30cd9b8fa5c3ef3d.tar.gz |
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 2b1891fa23..d170bcb544 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -93,7 +93,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 */ |