This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 0936e701b4d08ec47d30b6cc67b77c2549172b85 Author: Baptiste Coudurier <[email protected]> AuthorDate: Tue Nov 10 23:38:24 2026 -0800 Commit: Baptiste Coudurier <[email protected]> CommitDate: Wed Nov 18 06:41:42 2026 +0000 avcodec/libx264: size the mb_info map for interlaced encoding x264 reads mb_info over a row count rounded up to even when interlaced, so an odd macroblock row count read past the map. Found during review of #25909 by Forgejo_Fairy. Signed-off-by: Baptiste Coudurier <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> --- libavcodec/libx264.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index a432c0b50e..e5a853c10a 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -370,7 +370,10 @@ static int setup_mb_info(AVCodecContext *ctx, x264_picture_t *pic, mbinfo_rects = (const AVVideoRect *)av_video_hint_rects(info); nb_rects = info->nb_rects; - mbinfo = av_calloc(mb_width * mb_height, sizeof(*mbinfo)); + /* x264 rounds the macroblock row count up to an even number for + * interlaced and fake-interlaced encoding and reads mb_info over + * that grid, so size the map for it. The extra row stays 0. */ + mbinfo = av_calloc(mb_width * FFALIGN(mb_height, 2), sizeof(*mbinfo)); if (!mbinfo) return AVERROR(ENOMEM); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
