From d388dd9ee3e0aa11f9c700103fdd2f74bb78463c Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 22 Mar 2012 15:00:49 +0100 Subject: [PATCH] proresenc_anatoliy: switch to ff_alloc_packet2(). Signed-off-by: Michael Niedermayer --- libavcodec/proresenc_anatoliy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index f0cc4f5a67..bd96b52d2a 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -26,6 +26,7 @@ */ #include "avcodec.h" +#include "internal.h" #include "put_bits.h" #include "bytestream.h" #include "dsputil.h" @@ -493,9 +494,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, int frame_size = FFALIGN(avctx->width, 16) * FFALIGN(avctx->height, 16)*16 + 500 + FF_MIN_BUFFER_SIZE; //FIXME choose tighter limit - if (!pkt->data && - (ret = av_new_packet(pkt, frame_size + FF_MIN_BUFFER_SIZE)) < 0) { - av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n"); + if ((ret = ff_alloc_packet2(avctx, pkt, frame_size + FF_MIN_BUFFER_SIZE)) < 0) { return ret; }