From d43ca46969cd7d30cd945d37d50a8cf32b12bca3 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 25 Mar 2025 12:25:20 +0100 Subject: [PATCH 03/44] avcodec/mpeg4videodec: Avoid redundant assignments ff_h263_decode_frame() already checks for changing dimensions and automatically reinits the context in this case. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg4videodec.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index e21f1d24a2..51a2cd0a73 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2556,9 +2556,6 @@ static int decode_studio_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) /* Do the same check as non-studio profile */ if (width && height) { - if (s->width && s->height && - (s->width != width || s->height != height)) - s->context_reinit = 1; s->width = width; s->height = height; } @@ -2702,9 +2699,6 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb) check_marker(s->avctx, gb, "after height"); if (width && height && /* they should be non zero but who knows */ !(s->width && s->codec_tag == AV_RL32("MP4S"))) { - if (s->width && s->height && - (s->width != width || s->height != height)) - s->context_reinit = 1; s->width = width; s->height = height; } -- 2.45.2