diff options
author | James Zern <jzern@google.com> | 2013-03-06 11:11:00 -0800 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-06 22:11:46 +0100 |
commit | bcaf64b605442e1622d16da89d4ec0e7730b8a8c (patch) | |
tree | 602bba8a8f63390b54c3ffacb1fd246b6b65e592 /libavcodec/libmp3lame.c | |
parent | c257fe1fdee5846cde8f4ccb6fa2d01190829dac (diff) | |
download | ffmpeg-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/libmp3lame.c')
-rw-r--r-- | libavcodec/libmp3lame.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index 034fee73a9..e60856c10b 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -254,7 +254,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, av_dlog(avctx, "in:%d packet-len:%d index:%d\n", avctx->frame_size, len, s->buffer_index); if (len <= s->buffer_index) { - if ((ret = ff_alloc_packet2(avctx, avpkt, len))) + if ((ret = ff_alloc_packet2(avctx, avpkt, len)) < 0) return ret; memcpy(avpkt->data, s->buffer, len); s->buffer_index -= len; |