avcodec/cfhd: only increase s->level if transform is supported

This commit is contained in:
Paul B Mahol 2020-12-23 11:59:51 +01:00
parent b085a72c54
commit f975cf7cc0
1 changed files with 1 additions and 1 deletions

View File

@ -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;