[FFmpeg-cvslog] avcodec/asvenc: Don't use FF_INPUT_BUFFER_MIN_SIZE
Andreas Rheinhardt
git at videolan.org
Sat Apr 12 11:11:23 EEST 2025
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Apr 11 00:36:59 2025 +0200| [9bb617b3e7dbdc8d22047f86d1d80ccd33a01fc9] | committer: Andreas Rheinhardt
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 at niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bb617b3e7dbdc8d22047f86d1d80ccd33a01fc9
---
libavcodec/asvenc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c
index 9218a41021..e7d931cca9 100644
--- a/libavcodec/asvenc.c
+++ b/libavcodec/asvenc.c
@@ -271,8 +271,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return ret;
}
- if ((ret = ff_alloc_packet(avctx, pkt, c->mb_height * c->mb_width * MAX_MB_SIZE +
- FF_INPUT_BUFFER_MIN_SIZE)) < 0)
+ ret = ff_alloc_packet(avctx, pkt, c->mb_height * c->mb_width * MAX_MB_SIZE + 3);
+ if (ret < 0)
return ret;
init_put_bits(&a->pb, pkt->data, pkt->size);
More information about the ffmpeg-cvslog
mailing list