summaryrefslogtreecommitdiff
path: root/libavcodec/adpcmenc.c
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2013-03-06 11:11:00 -0800
committerMichael Niedermayer <michaelni@gmx.at>2013-03-06 22:11:46 +0100
commitbcaf64b605442e1622d16da89d4ec0e7730b8a8c (patch)
tree602bba8a8f63390b54c3ffacb1fd246b6b65e592 /libavcodec/adpcmenc.c
parentc257fe1fdee5846cde8f4ccb6fa2d01190829dac (diff)
downloadffmpeg-bcaf64b605442e1622d16da89d4ec0e7730b8a8c.tar.gz
normalize calls to ff_alloc_packet2
- check ret < 0 - remove excessive error log Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r--libavcodec/adpcmenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 8caedf7965..59f016bdb1 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -494,7 +494,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8;
else
pkt_size = avctx->block_align;
- if ((ret = ff_alloc_packet2(avctx, avpkt, pkt_size)))
+ if ((ret = ff_alloc_packet2(avctx, avpkt, pkt_size)) < 0)
return ret;
dst = avpkt->data;