This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 8a431cd8babf43f727cb1ea1f683d85c07243753 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Sat Jun 28 05:03:59 2025 +0200 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Sat Mar 7 20:14:36 2026 +0100 avcodec/rv10enc: Check dimensions once during init Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/rv10enc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index 3609d82161..70a1e3c769 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -52,11 +52,6 @@ int ff_rv10_encode_picture_header(MPVMainEncContext *const m) /* if multiple packets per frame are sent, the position at which to display the macroblocks is coded here */ if(!full_frame){ - if (s->c.mb_width * s->c.mb_height >= (1U << 12)) { - avpriv_report_missing_feature(s->c.avctx, "Encoding frames with %d (>= 4096) macroblocks", - s->c.mb_width * s->c.mb_height); - return AVERROR(ENOSYS); - } put_bits(&s->pb, 6, 0); /* mb_x */ put_bits(&s->pb, 6, 0); /* mb_y */ put_bits(&s->pb, 12, s->c.mb_width * s->c.mb_height); @@ -72,6 +67,11 @@ static av_cold int rv10_encode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "width and height must be a multiple of 16\n"); return AVERROR(EINVAL); } + if (avctx->width * avctx->height >= 1U << 20) { + avpriv_report_missing_feature(avctx, "Encoding frames with %d (>= 4096) macroblocks", + avctx->width * avctx->height >> 8); + return AVERROR(ENOSYS); + } return ff_mpv_encode_init(avctx); } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
