[FFmpeg-cvslog] avcodec/truespeech: fix left shift of negative value

Paul B Mahol git at videolan.org
Thu Sep 26 17:05:57 EEST 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Sep 26 16:03:33 2019 +0200| [9b611deef176029750a498fe2369b4e7c7d0ffd6] | committer: Paul B Mahol

avcodec/truespeech: fix left shift of negative value

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

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

diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 54352851b3..799cef0945 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -281,7 +281,7 @@ static void truespeech_synth(TSContext *dec, int16_t *out, int quart)
 
     ptr0 = dec->tmp3;
     for(i = 0; i < 60; i++){
-        int sum = out[i] << 12;
+        int sum = out[i] * (1 << 12);
         for(k = 0; k < 8; k++)
             sum += ptr0[k] * t[k];
         for(k = 7; k > 0; k--)



More information about the ffmpeg-cvslog mailing list