diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index 7afbbac59e..90b3d0a850 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -819,7 +819,7 @@ static int cfhd_decode(AVCodecContext *avctx, AVFrame *pic, VLC_BITS, 3, 1); /* escape */ - if (level == 64 && run == 2) + if (!run) break; count += run; @@ -850,7 +850,7 @@ static int cfhd_decode(AVCodecContext *avctx, AVFrame *pic, VLC_BITS, 3, 1); /* escape */ - if (level == 255 && run == 2) + if (!run) break; count += run; diff --git a/libavcodec/cfhddata.c b/libavcodec/cfhddata.c index 67bd8e66db..212dccadb9 100644 --- a/libavcodec/cfhddata.c +++ b/libavcodec/cfhddata.c @@ -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, 2, + 1, 0, }; static const uint8_t table_9_vlc_level[NB_VLC_TABLE_9] = { @@ -226,7 +226,7 @@ static const uint16_t table_18_vlc_run[NB_VLC_TABLE_18] = { 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, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 0, }; static const uint8_t table_18_vlc_level[NB_VLC_TABLE_18] = {