diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-07 14:55:10 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-08-20 14:29:11 +0200 |
commit | 8fc8b3eebe95aa0c810b6ceacf41d54b785d0589 (patch) | |
tree | 91c7fa547060794f0ff1c0eaa7e1dea7c65d970f | |
parent | 5709ac5c42a7d566d9373e7084be04d4962338b3 (diff) | |
download | ffmpeg-8fc8b3eebe95aa0c810b6ceacf41d54b785d0589.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 5c40539c83..2753f2c2d3 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 */ |