normalize calls to ff_alloc_packet2

- check ret < 0
- remove excessive error log

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
James Zern 2013-03-06 11:11:00 -08:00 committed by Michael Niedermayer
parent c257fe1fde
commit bcaf64b605
28 changed files with 28 additions and 32 deletions

View file

@ -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;