summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-11 10:56:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-08-11 10:56:07 +0200
commitb905a7137a51a9a4f66d75172897d1f38c0b292a (patch)
treef31df3a394d393e2ecb42f0c2fd78c0a1f087632 /libavcodec/avpacket.c
parent67a580f423f23565d885462857494d03a28cc2f1 (diff)
avcodec/avpacket: Fix memory allocation failure check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r--libavcodec/avpacket.c2
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);