mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
avformat/mp3dec: Check for avcodec_alloc_context3() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b851bc20c6
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
64c82912a7
commit
458ba000a5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user