[libav-commits] WMAL: Shift output samples by the specified number of padding zeroes.

Jakub Stachowski git at libav.org
Sat May 5 12:39:30 CEST 2012


Module: libav
Branch: master
Commit: ddffe3de4352eb025b78843cf3b44501056b54bb

Author:    Jakub Stachowski <qbast at go2.pl>
Committer: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:      Thu May  3 19:36:48 2012 +0200

WMAL: Shift output samples by the specified number of padding zeroes.

Signed-off-by: Kostya Shishkov <kostya.shishkov at gmail.com>

---

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

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index 7510b12..d4c9c5a 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -979,10 +979,10 @@ static int decode_subframe(WmallDecodeCtx *s)
 
         for (j = 0; j < subframe_len; j++) {
             if (s->bits_per_sample == 16) {
-                *s->samples_16[c] = (int16_t) s->channel_residues[c][j];
+                *s->samples_16[c] = (int16_t) s->channel_residues[c][j] << padding_zeroes;
                 s->samples_16[c] += s->num_channels;
             } else {
-                *s->samples_32[c] = s->channel_residues[c][j];
+                *s->samples_32[c] = s->channel_residues[c][j] << padding_zeroes;
                 s->samples_32[c] += s->num_channels;
             }
         }



More information about the libav-commits mailing list