[vlc-commits] Fix wrong implicit cast

Rémi Duraffort git at videolan.org
Sun Jan 19 17:43:50 CET 2014


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jan 19 17:42:04 2014 +0100| [d2ff0942a2b6d18a9dfb53ad041f2ade62a2d365] | committer: Rémi Duraffort

Fix wrong implicit cast

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

 modules/audio_mixer/integer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_mixer/integer.c b/modules/audio_mixer/integer.c
index 5f6d86a..76ec4ba 100644
--- a/modules/audio_mixer/integer.c
+++ b/modules/audio_mixer/integer.c
@@ -51,10 +51,10 @@ static void FilterS32N (audio_volume_t *vol, block_t *block, float volume)
     for (size_t n = block->i_buffer / sizeof (*p); n > 0; n--)
     {
         int64_t s = *p * (int64_t)mult;
-        if (s >= (INT32_MAX << INT64_C(24)))
+        if (s >= ((int64_t)INT32_MAX << INT64_C(24)))
             *p = INT32_MAX;
         else
-        if (s < (INT32_MIN << INT64_C(24)))
+        if (s < ((int64_t)INT32_MIN << INT64_C(24)))
             *p = INT32_MIN;
         else
             *p = s >> INT64_C(24);



More information about the vlc-commits mailing list