avcodec/mpeg4videodec: Remove always-false check

All valid values of dc_lum and dc_chrom are in the range 0..9,
because they are initialized via tables with 10 elements.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-06-08 02:01:38 +02:00
parent 963bdac226
commit 1d270e99f9

View File

@ -895,7 +895,7 @@ static inline int mpeg4_decode_dc(MpegEncContext *s, int n, int *dir_ptr)
else
code = get_vlc2(&s->gb, dc_chrom, DC_VLC_BITS, 1);
if (code < 0 || code > 9 /* && s->nbit < 9 */) {
if (code < 0) {
av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
return AVERROR_INVALIDDATA;
}