Commit b3a43515 authored by Michael Niedermayer's avatar Michael Niedermayer

wmalosslessdec: Fix reading too many bits in decode_channel_residues()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2a7063de
......@@ -520,7 +520,7 @@ static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size)
residue = quo;
else {
rem_bits = av_ceil_log2(ave_mean);
rem = rem_bits ? get_bits(&s->gb, rem_bits) : 0;
rem = get_bits_long(&s->gb, rem_bits);
residue = (quo << rem_bits) + rem;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment