libmp3lame: switch to ff_alloc_packet2().
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Mar 2012 14:00:47 +0000 (15:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Mar 2012 18:03:20 +0000 (19:03 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libmp3lame.c

index 686dfc2..b8c32bc 100644 (file)
@@ -255,8 +255,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_packet(avpkt, len))) {
-            av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
+        if ((ret = ff_alloc_packet2(avctx, avpkt, len))) {
             return ret;
         }
         memcpy(avpkt->data, s->buffer, len);