[FFmpeg-cvslog] avformat/mp3dec: Check for avcodec_alloc_context3() failure
Michael Niedermayer
git at videolan.org
Tue May 19 20:34:06 CEST 2015
ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Thu Feb 26 20:11:19 2015 +0100| [86be9cda97d2577165127c3b7075aa6a038995ab] | committer: Michael Niedermayer
avformat/mp3dec: Check for avcodec_alloc_context3() failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit b851bc20c6931c084710e69f7eec30d8c1bdb68e)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86be9cda97d2577165127c3b7075aa6a038995ab
---
libavformat/mp3dec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 7ad6845..b3a78d0 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -63,6 +63,9 @@ static int mp3_read_probe(AVProbeData *p)
const uint8_t *buf, *buf0, *buf2, *end;
AVCodecContext *avctx = avcodec_alloc_context3(NULL);
+ if (!avctx)
+ return 0;
+
buf0 = p->buf;
end = p->buf + p->buf_size - sizeof(uint32_t);
while(buf0 < end && !*buf0)
More information about the ffmpeg-cvslog
mailing list