diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-11 10:56:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-11 10:56:07 +0200 |
commit | b905a7137a51a9a4f66d75172897d1f38c0b292a (patch) | |
tree | f31df3a394d393e2ecb42f0c2fd78c0a1f087632 | |
parent | 67a580f423f23565d885462857494d03a28cc2f1 (diff) | |
download | ffmpeg-b905a7137a51a9a4f66d75172897d1f38c0b292a.tar.gz |
avcodec/avpacket: Fix memory allocation failure check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/avpacket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index 87d1507bc1..8b65e459eb 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -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); |