From 2ca072e168fd4b4a4edd3dfa2eddf344d86c57e4 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 25 Nov 2025 20:31:26 +0100 Subject: [PATCH] avcodec/vp3: Remove always-false checks The dimensions are only set at two places: theora_decode_header() and vp3_decode_init(). These functions are called during init and during dimension changes, but the latter is only supported (and attempted) when frame threading is not active. This implies that the dimensions of the various worker threads in vp3_update_thread_context() always coincide, so that these checks are dead and can be removed. (These checks would of course need to be removed when support for dimension changes during frame threading is implemented; and in any case, a dimension change is not an error.) Reviewed-by: Peter Ross Signed-off-by: Andreas Rheinhardt --- libavcodec/vp3.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 9a766ecb41..60908c877f 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2528,10 +2528,8 @@ static int vp3_update_thread_context(AVCodecContext *dst, const AVCodecContext * // copy previous frame data ref_frames(s, s1); - if (!s1->current_frame.f || - s->width != s1->width || s->height != s1->height) { + if (!s1->current_frame.f) return -1; - } if (s != s1) { s->keyframe = s1->keyframe;