Commit 9e52f6b9 authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Michael Niedermayer
Browse files

wmalosslessdec: avoid reading 0 bits with get_bits

Reviewed-by: default avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: default avatarAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f9020d51

)
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -487,7 +487,7 @@ static int decode_cdlms(WmallDecodeCtx *s)
if ((1 << cbits) < s->cdlms[c][i].scaling + 1)
cbits++;
s->cdlms[c][i].bitsend = get_bits(&s->gb, cbits) + 2;
s->cdlms[c][i].bitsend = (cbits ? get_bits(&s->gb, cbits) : 0) + 2;
shift_l = 32 - s->cdlms[c][i].bitsend;
shift_r = 32 - s->cdlms[c][i].scaling - 2;
for (j = 0; j < s->cdlms[c][i].coefsend; j++)
......
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