[FFmpeg-cvslog] qdm2: Fix data type used in multiplication.

Michael Niedermayer git at videolan.org
Sun Feb 3 20:11:03 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 30 03:13:30 2012 +0100| [ccfd8cffe867d534447dbc5beb96ff39e65e2791] | committer: Michael Niedermayer

qdm2: Fix data type used in multiplication.

Avoid unintended truncation.
Fixes CID700555

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/qdm2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index ca2aab7..9bc0720 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -685,7 +685,7 @@ static void fill_coding_method_array (sb_int8_array tone_level_idx, sb_int8_arra
                     for (j = 0; j < 64; j++)
                         acc += tone_level_idx_temp[ch][sb][j];
 
-            multres = 0x66666667 * (acc * 10);
+            multres = 0x66666667LL * (acc * 10);
             esp_40 = (multres >> 32) / 8 + ((multres & 0xffffffff) >> 31);
             for (ch = 0;  ch < nb_channels; ch++)
                 for (sb = 0; sb < 30; sb++)



More information about the ffmpeg-cvslog mailing list