[FFmpeg-cvslog] avcodec/mpeg4videodec: Remove always-false check
Andreas Rheinhardt
git at videolan.org
Thu Jun 20 20:00:43 EEST 2024
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jun 8 02:01:38 2024 +0200| [1d270e99f96511ae5667e101663e6cba6d890cdd] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1d270e99f96511ae5667e101663e6cba6d890cdd
---
libavcodec/mpeg4videodec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 18329132aa..130cde7a9d 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list