Commit b905a713 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/avpacket: Fix memory allocation failure check

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 67a580f4
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment