mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
wmalosslessdec: avoid reading 0 bits with get_bits
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit f9020d514e9ed5043496a710b36daba1ab182e97) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
151554e1eb
commit
1ec0541ae0
@ -488,7 +488,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++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user