summaryrefslogtreecommitdiff
path: root/libavcodec/libfaac.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/libfaac.c
parentc257fe1fdee5846cde8f4ccb6fa2d01190829dac (diff)
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/libfaac.c')
-rw-r--r--libavcodec/libfaac.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index bf226af956..43de22a80b 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -184,10 +184,8 @@ static int Faac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
int num_samples = frame ? frame->nb_samples : 0;
void *samples = frame ? frame->data[0] : NULL;
- if ((ret = ff_alloc_packet2(avctx, avpkt, (7 + 768) * avctx->channels))) {
- av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
+ if ((ret = ff_alloc_packet2(avctx, avpkt, (7 + 768) * avctx->channels)) < 0)
return ret;
- }
bytes_written = faacEncEncode(s->faac_handle, samples,
num_samples * avctx->channels,