avcodec/cfhd: fix escape handling for old codebook

This commit is contained in:
Paul B Mahol 2022-09-03 11:06:14 +02:00
parent 10ed73e933
commit 4beac58e90
2 changed files with 2 additions and 2 deletions

View File

@ -819,7 +819,7 @@ static int cfhd_decode(AVCodecContext *avctx, AVFrame *pic,
VLC_BITS, 3, 1);
/* escape */
if (level == 64)
if (level == 64 && run == 2)
break;
count += run;

View File

@ -72,7 +72,7 @@ static const uint16_t table_9_vlc_run[NB_VLC_TABLE_9] = {
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1
1, 2,
};
static const uint8_t table_9_vlc_level[NB_VLC_TABLE_9] = {