mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
avcodec/avpacket: Fix memory allocation failure check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
67a580f423
commit
b905a7137a
@ -80,7 +80,7 @@ static int packet_alloc(AVBufferRef **buf, int size)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
av_buffer_realloc(buf, size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!buf)
|
||||
if (!*buf)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
memset((*buf)->data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user