summaryrefslogtreecommitdiff
path: root/libavcodec/cfhd.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-12-23 11:59:51 +0100
committerPaul B Mahol <onemda@gmail.com>2021-01-17 13:40:15 +0100
commitf975cf7cc061b814bc029bb2fc86f656494c4d5c (patch)
treebe48ef35d9420be3bfab72d296d4427066ad9f51 /libavcodec/cfhd.c
parentb085a72c54ced391d4e1cd00d2a2959b5a5704e6 (diff)
avcodec/cfhd: only increase s->level if transform is supported
Diffstat (limited to 'libavcodec/cfhd.c')
-rw-r--r--libavcodec/cfhd.c2
1 files changed, 1 insertions, 1 deletions
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;