mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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>
This commit is contained in:
parent
59216e0525
commit
e36db49b7b
89 changed files with 96 additions and 92 deletions
|
|
@ -618,7 +618,7 @@ static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||
else
|
||||
max_frame_size = s->max_coded_frame_size;
|
||||
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, 2 * max_frame_size)) < 0)
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, 2 * max_frame_size, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
/* use verbatim mode for compression_level 0 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue