[FFmpeg-devel] [PATCH 1/2] avcodec/cfhd: only increase s->level if transform is known

Paul B Mahol onemda at gmail.com
Wed Dec 23 13:35:38 EET 2020


Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
 libavcodec/cfhd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index a2b9c7c76a..a4f4cb4b3c 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -436,7 +436,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
             }
             init_plane_defaults(s);
         } else if (tag == SubbandNumber) {
-            if (s->subband_num != 0 && data == 1)  // hack
+            if (s->subband_num != 0 && data == 1 && s->transform_type >= 0)  // hack
                 s->level++;
             av_log(avctx, AV_LOG_DEBUG, "Subband number %"PRIu16"\n", data);
             s->subband_num = data;
-- 
2.17.1



More information about the ffmpeg-devel mailing list