diff mbox series

[FFmpeg-devel,102/114] avcodec/intrax8: Replace always-false check by assert

Message ID 20201110105836.321916-11-andreas.rheinhardt@gmail.com
State Superseded
Headers show
Series VLC, esp. init_vlc patches
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 10, 2020, 10:58 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/intrax8.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index f385423dc1..bd00a3e027 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -115,11 +115,7 @@  static av_cold int x8_vlc_init(void)
         init_or_vlc(j_orient_vlc[1][i], x8_orient_lowquant_table[i][0]);
 #undef init_or_vlc
 
-    if (offset != sizeof(table) / sizeof(VLC_TYPE) / 2) {
-        av_log(NULL, AV_LOG_ERROR, "table size %"SIZE_SPECIFIER" does not match needed %i\n",
-               sizeof(table) / sizeof(VLC_TYPE) / 2, offset);
-        return AVERROR_INVALIDDATA;
-    }
+    av_assert2(offset == FF_ARRAY_ELEMS(table));
 
     return 0;
 }