Commit 3b00fd59 authored by Jakub Stachowski's avatar Jakub Stachowski Committed by Michael Niedermayer

wmalosslessdec: Reset residues to 0 if they were not decoded from bitstream.

If channel residues are have not been decoded from bitstream, they should be
initialized to 0 instead of using values from previous subframe.
This causes bursts of noise in silent parts of some files.
This patch fixes bug #1055
Reviewed-by: 's avatarBenjamin Larsson <benjamin@southpole.se>
Reviewed-by: 's avatarMashiat Sarker Shakkhar <mashiat.sarker@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9e938d22
......@@ -955,7 +955,8 @@ static int decode_subframe(WmallDecodeCtx *s)
else
use_normal_update_speed(s, i);
revert_cdlms(s, i, 0, subframe_len);
}
} else
memset(s->channel_residues, 0, sizeof(s->channel_residues));
}
if (s->do_mclms)
revert_mclms(s, subframe_len);
......
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