diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-18 08:16:36 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-18 12:20:16 +0200 |
commit | 6401a5d4b836a08090bc82e5d3101cc1873ae2a7 (patch) | |
tree | 9759c07d0eef01d9dd49759601f81d992aed9c05 /libavcodec/smacker.c | |
parent | 92396cee602320c714713ca2d93b53684ad57000 (diff) |
Revert "avcodec/vlc: Add macro for ff_init_vlc_sparse()"
This reverts commit 61669b7c40b8dc3a0841768fb39c7567513b7cfc.
This commit broke building with MSVC due to its spec-incompliant handling
of ',' in __VA_ARGS__: These are not treated as argument separators for
further macros, so that in our case the init_vlc2() macro is treated as
having only one argument whenever the init_vlc() macro is used. See [1]
for further details.
[1]: https://reviews.llvm.org/D69626
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r-- | libavcodec/smacker.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index ffd24c11e7..813eb862c0 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -222,9 +222,9 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int skip_bits1(gb); if (h.current > 1) { err = ff_init_vlc_sparse(&vlc[i], SMKTREE_BITS, h.current, - INIT_VLC_DEFAULT_SIZES(h.lengths), - INIT_VLC_DEFAULT_SIZES(h.bits), - INIT_VLC_DEFAULT_SIZES(h.values), + h.lengths, sizeof(*h.lengths), sizeof(*h.lengths), + h.bits, sizeof(*h.bits), sizeof(*h.bits), + h.values, sizeof(*h.values), sizeof(*h.values), INIT_VLC_LE); if (err < 0) { av_log(smk->avctx, AV_LOG_ERROR, "Cannot build VLC table\n"); @@ -653,9 +653,9 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, skip_bits1(&gb); if (h.current > 1) { ret = ff_init_vlc_sparse(&vlc[i], SMKTREE_BITS, h.current, - INIT_VLC_DEFAULT_SIZES(h.lengths), - INIT_VLC_DEFAULT_SIZES(h.bits), - INIT_VLC_DEFAULT_SIZES(h.values), + h.lengths, sizeof(*h.lengths), sizeof(*h.lengths), + h.bits, sizeof(*h.bits), sizeof(*h.bits), + h.values, sizeof(*h.values), sizeof(*h.values), INIT_VLC_LE); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Cannot build VLC table\n"); |