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:
@@ -78,7 +78,7 @@ static int s302m_encode2_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
uint8_t *o;
|
||||
PutBitContext pb;
|
||||
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, buf_size)) < 0)
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, buf_size, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
o = avpkt->data;
|
||||
|
Reference in New Issue
Block a user