[FFmpeg-cvslog] wmalosslessdec: Reset residues to 0 if they were not decoded from bitstream .

Jakub Stachowski git at videolan.org
Thu Apr 12 13:11:11 CEST 2012


ffmpeg | branch: master | Jakub Stachowski <qbast at go2.pl> | Wed Apr 11 23:36:07 2012 +0200| [3b00fd5985c3ddffe7f66f72dcaa13b478fc7459] | committer: 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: Benjamin Larsson <benjamin at southpole.se>
Reviewed-by: Mashiat Sarker Shakkhar <mashiat.sarker at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b00fd5985c3ddffe7f66f72dcaa13b478fc7459
---

 libavcodec/wmalosslessdec.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index ab7af95..e511443 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -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);



More information about the ffmpeg-cvslog mailing list