From e36db49b7b31cb17912895cb4d95b7b45d6f0882 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Jul 2015 19:36:16 +0200 Subject: avcodec: Add a min size parameter to ff_alloc_packet2() This parameter can be used to inform the allocation code about how much downsizing might occur, and can be used to optimize how to allocate the packet Signed-off-by: Michael Niedermayer --- libavcodec/cinepakenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/cinepakenc.c') diff --git a/libavcodec/cinepakenc.c b/libavcodec/cinepakenc.c index 2931fa3bc8..0f0b8cde7a 100644 --- a/libavcodec/cinepakenc.c +++ b/libavcodec/cinepakenc.c @@ -1275,7 +1275,7 @@ static int cinepak_encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->lambda = frame->quality ? frame->quality - 1 : 2 * FF_LAMBDA_SCALE; - if ((ret = ff_alloc_packet2(avctx, pkt, s->frame_buf_size)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, s->frame_buf_size, 0)) < 0) return ret; ret = rd_frame(s, frame, (s->curframe == 0), pkt->data, s->frame_buf_size); pkt->size = ret; -- cgit v1.2.3