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

index f5b3015..1d0f5fb 100644 (file)
@@ -228,10 +228,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
         I_frame = 1;
     }
 
         I_frame = 1;
     }
 
-    if ((res = ff_alloc_packet(pkt, s->image_width * s->image_height * 3)) < 0) {
-        //Conservative upper bound check for compressed data
-        av_log(avctx, AV_LOG_ERROR, "Error getting output packet of size %d.\n",
-               s->image_width * s->image_height * 3);
+    if ((res = ff_alloc_packet2(avctx, pkt, s->image_width * s->image_height * 3)) < 0) {
         return res;
     }
 
         return res;
     }