[vlc-commits] audio format: fix FI32 -> S16N conversion

Rémi Denis-Courmont git at videolan.org
Fri Dec 21 19:19:28 CET 2012


vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Dec 21 20:15:46 2012 +0200| [a1f97b91767bb820cf9bf44aef700ba97809705a] | committer: Rémi Denis-Courmont

audio format: fix FI32 -> S16N conversion

(cherry picked from commit 84fab3ddd6f554d922df1c18ae4ab1266598d383)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=a1f97b91767bb820cf9bf44aef700ba97809705a
---

 modules/audio_filter/converter/format.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/audio_filter/converter/format.c b/modules/audio_filter/converter/format.c
index 31d80d4..8a1dcf6 100644
--- a/modules/audio_filter/converter/format.c
+++ b/modules/audio_filter/converter/format.c
@@ -393,7 +393,7 @@ static block_t *Fi32toS16(filter_t *filter, block_t *b)
         else if (v <= -FIXED32_ONE)
             *dst++ = INT16_MIN;
         else
-            *dst++ = v >> (32 - FIXED32_FRACBITS);
+            *dst++ = v >> (FIXED32_FRACBITS - 15);
     }
     b->i_buffer /= 2;
     return b;



More information about the vlc-commits mailing list