PR #20786 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20786
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20786.patch


>From 7dddd98a62cbb30586d704d9365cbf87b04cd64b Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <[email protected]>
Date: Wed, 29 Oct 2025 15:47:47 +0100
Subject: [PATCH 1/2] avcodec/vc1dec: Don't initialize write-only
 intra_scantable

VC-1 does not use it.

Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/vc1dec.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 55225baec9..35d8c68f45 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -468,9 +468,6 @@ av_cold int ff_vc1_decode_init(AVCodecContext *avctx)
     if (ret < 0)
         return ret;
 
-    ff_permute_scantable(s->intra_scantable.permutated, ff_wmv1_scantable[1],
-                         s->idsp.idct_permutation);
-
     ret = vc1_decode_init_alloc_tables(v);
     if (ret < 0) {
         vc1_decode_reset(avctx);
-- 
2.49.1


>From 3e8af4515c36caf744328f25c60376f9aebbae53 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <[email protected]>
Date: Wed, 29 Oct 2025 15:59:17 +0100
Subject: [PATCH 2/2] avcodec/vc1dec: Deduplicate cleanup code

Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/vc1dec.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 35d8c68f45..1925384ba5 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1366,12 +1366,7 @@ image:
     }
 
 end:
-    av_free(buf2);
-    for (i = 0; i < n_slices; i++)
-        av_free(slices[i].buf);
-    av_free(slices);
-    return buf_size;
-
+    ret = buf_size;
 err:
     av_free(buf2);
     for (i = 0; i < n_slices; i++)
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to