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
|
|
@ -106,7 +106,7 @@ static int twolame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||
TWOLAMEContext *s = avctx->priv_data;
|
||||
int ret;
|
||||
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, MPA_MAX_CODED_FRAME_SIZE)) < 0)
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, MPA_MAX_CODED_FRAME_SIZE, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
if (frame) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue