diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-27 19:36:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-27 19:57:52 +0200 |
commit | e36db49b7b31cb17912895cb4d95b7b45d6f0882 (patch) | |
tree | e8cb205407627584f9d9eb6563a02dac3c4cfbd8 /libavcodec/roqvideoenc.c | |
parent | 59216e0525a58714be4207be6ae8744750e62867 (diff) | |
download | ffmpeg-e36db49b7b31cb17912895cb4d95b7b45d6f0882.tar.gz |
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 <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/roqvideoenc.c')
-rw-r--r-- | libavcodec/roqvideoenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c index bb5be77211..72fc2d75ae 100644 --- a/libavcodec/roqvideoenc.c +++ b/libavcodec/roqvideoenc.c @@ -1090,7 +1090,7 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt, /* 138 bits max per 8x8 block + * 256 codebooks*(6 bytes 2x2 + 4 bytes 4x4) + 8 bytes frame header */ size = ((enc->width * enc->height / 64) * 138 + 7) / 8 + 256 * (6 + 4) + 8; - if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0) + if ((ret = ff_alloc_packet2(avctx, pkt, size, 0)) < 0) return ret; enc->out_buf = pkt->data; |