From a895669f53849dc17906ef0389ea01ee524c4ece Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 22 Mar 2012 15:00:48 +0100 Subject: [PATCH] ljpegenc: switch to ff_alloc_packet2(). Signed-off-by: Michael Niedermayer --- libavcodec/ljpegenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index b5b443e7cc..162a679d51 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -57,8 +57,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, max_pkt_size += mb_width * mb_height * 3 * 4 * s->mjpeg_hsample[0] * s->mjpeg_vsample[0]; } - if ((ret = ff_alloc_packet(pkt, max_pkt_size)) < 0) { - av_log(avctx, AV_LOG_ERROR, "Error getting output packet of size %d.\n", max_pkt_size); + if ((ret = ff_alloc_packet2(avctx, pkt, max_pkt_size)) < 0) { return ret; }