You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/avpacket: Fix memory allocation failure check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user