[FFmpeg-devel] [PATCH 2/2] avcodec/snowdec: support DWT with new size rounding

Michael Niedermayer michael at niedermayer.cc
Sat Mar 25 00:10:25 EET 2023


Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/snowdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index bed29d3390..b7a5864f4c 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -385,7 +385,7 @@ static int decode_header(SnowContext *s){
     }
 
     s->spatial_decomposition_type+= (unsigned)get_symbol(&s->c, s->header_state, 1);
-    if(s->spatial_decomposition_type > 1U){
+    if((s->spatial_decomposition_type & (~4)) > 1U){
         av_log(s->avctx, AV_LOG_ERROR, "spatial_decomposition_type %d not supported\n", s->spatial_decomposition_type);
         return AVERROR_INVALIDDATA;
     }
-- 
2.17.1



More information about the ffmpeg-devel mailing list