1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/asvenc: Don't use FF_INPUT_BUFFER_MIN_SIZE

ASV-1/2 does not really have a header and so using
FF_INPUT_BUFFER_MIN_SIZE is wasteful as well as ugly
(such bounds should be codec-specific).

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-04-11 00:36:59 +02:00
parent b02985b12c
commit 9bb617b3e7

View File

@ -271,8 +271,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return ret; return ret;
} }
if ((ret = ff_alloc_packet(avctx, pkt, c->mb_height * c->mb_width * MAX_MB_SIZE + ret = ff_alloc_packet(avctx, pkt, c->mb_height * c->mb_width * MAX_MB_SIZE + 3);
FF_INPUT_BUFFER_MIN_SIZE)) < 0) if (ret < 0)
return ret; return ret;
init_put_bits(&a->pb, pkt->data, pkt->size); init_put_bits(&a->pb, pkt->data, pkt->size);