From 8685c1ae10130f46773382459f6b5850ef891e3d Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 25 Mar 2025 06:26:12 +0100 Subject: [PATCH 13/44] avcodec/rv10: Use ff_mpv_decode_reinit() Signed-off-by: Andreas Rheinhardt --- libavcodec/rv10.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 482af8e52a..4431bff929 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -32,7 +32,6 @@ #include "avcodec.h" #include "codec_internal.h" -#include "decode.h" #include "error_resilience.h" #include "h263.h" #include "h263data.h" @@ -222,8 +221,6 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size) if (whole_size < (new_w + 15)/16 * ((new_h + 15)/16) / 8) return AVERROR_INVALIDDATA; - ff_mpv_common_end(s); - // attempt to keep aspect during typical resolution switches if (!old_aspect.num) old_aspect = (AVRational){1, 1}; @@ -232,13 +229,10 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size) if ((int64_t)new_w * s->height == 2 * (int64_t)new_h * s->width) s->avctx->sample_aspect_ratio = av_mul_q(old_aspect, (AVRational){1, 2}); - ret = ff_set_dimensions(s->avctx, new_w, new_h); - if (ret < 0) - return ret; - s->width = new_w; s->height = new_h; - if ((ret = ff_mpv_common_init(s)) < 0) + ret = ff_mpv_decode_reinit(s); + if (ret < 0) return ret; } -- 2.45.2