diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 44de9b57e7e9f9bce1a43bd1793deeec141c7189..4b919b0880b8a675097b9320fc57a850d832a38c 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)