From f975cf7cc061b814bc029bb2fc86f656494c4d5c Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 23 Dec 2020 11:59:51 +0100 Subject: [PATCH] avcodec/cfhd: only increase s->level if transform is supported --- libavcodec/cfhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 17ddcdd2df..aae6bd78db 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 || s->transform_type == 2)) // hack s->level++; av_log(avctx, AV_LOG_DEBUG, "Subband number %"PRIu16"\n", data); s->subband_num = data;