summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-02-26 23:19:09 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-02-29 10:30:16 +0100
commit4a134eb14abbbf73f5e2b9452f3078c2bf3912ec (patch)
tree00b95bb1954affad06ee16816eaa22fefa12db0d
parentd263fce2b209e86a5a1e8f1b6aa33430ecc2c187 (diff)
avcodec/intrax8: Fix assert
Commit 900ce6f8c3526f27173057bb955f54f4f4f41246 replaced IntraX8Context.ac_vlc by IntraX8Context.ac_vlc_table, but forgot to update an av_assert2()*. cf7ed01938a4d8b2ccd28f1fadacd79103e54eed then replaced this with a check for j_ac_vlc[mode], but this makes no sense as j_ac_vlc is of type const VLCElem [2][2][8][]. Worse yet, mode can be up to three and then j_ac_vlc[mode] is undefined behaviour. This happened during the wmv8-x8intra FATE test. *: Since 84f16bb5e68dc47eca4dc96b3391c58471cd7328 config.h was no longer auto-included in avassert.h and this disabled av_assert1() and av_assert2() in files where config.h has not been included before the inclusion of avassert.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/intrax8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index b6aacb170a..948391599f 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -103,7 +103,7 @@ static inline void x8_select_ac_table(IntraX8Context *const w, int mode)
table_index = get_bits(w->gb, 3);
// 2 modes use same tables
w->j_ac_vlc_table[mode] = j_ac_vlc[w->quant < 13][mode >> 1][table_index];
- av_assert2(j_ac_vlc[mode]);
+ av_assert2(w->j_ac_vlc_table[mode]);
}
static inline int x8_get_orient_vlc(IntraX8Context *w)