From dd875f56b7fe0f04cf7c1c40faee5f7bad9db021 Mon Sep 17 00:00:00 2001 From: Manuel Lauss Date: Tue, 2 Sep 2025 17:25:17 +0200 Subject: [PATCH] avcodec/sanm: invalidate STOR data when subversion changes since the STOR data is a different format. Signed-off-by: Manuel Lauss --- libavcodec/sanm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index d1d53aa2da..5bb8f9017e 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -1795,8 +1795,10 @@ static int process_frame_obj(SANMVideoContext *ctx, GetByteContext *gb, } /* users of codecs>=37 are subversion 2, enforce that for STOR/FTCH */ - if (fsc) + if (fsc && ctx->subversion < 2) { ctx->subversion = 2; + ctx->stor_size = 0; /* invalidate existing data */ + } /* clear the main buffer on the first fob */ if (ctx->first_fob) {