]> git.sesse.net Git - ffmpeg/commitdiff
gifenc: switch to ff_alloc_packet2()
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Mar 2012 03:24:30 +0000 (04:24 +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/gif.c

index 2ae63865d293be60e22cccb3ba35f426b8a6ded2..b8d7f1ac41ff852a3ddef233266eafbd4230bd29 100644 (file)
@@ -164,8 +164,7 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *outbuf_ptr, *end;
     int ret;
 
-    if ((ret = ff_alloc_packet(pkt, avctx->width*avctx->height*7/5 + FF_MIN_BUFFER_SIZE)) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*7/5 + FF_MIN_BUFFER_SIZE)) < 0) {
         return ret;
     }
     outbuf_ptr = pkt->data;