diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-26 20:11:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-21 20:43:39 +0200 |
commit | 458ba000a57ca246b0ca5b8734ec6c1e28cff236 (patch) | |
tree | 5a879938ccad0943525920429094886e6a10a909 /libavformat/mp3dec.c | |
parent | 64c82912a74aee655618f67998c99eda36d2c6bb (diff) | |
download | ffmpeg-458ba000a57ca246b0ca5b8734ec6c1e28cff236.tar.gz |
avformat/mp3dec: Check for avcodec_alloc_context3() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b851bc20c6931c084710e69f7eec30d8c1bdb68e)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r-- | libavformat/mp3dec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 030b11f3b7..d981874582 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) |