Fixes the last undefined behaviour in the truespeech FATE-test as well
as the last of the truespeech bugs reported in ticket #8159. The other
left shifts of negative numbers have already been fixed in c7c0229b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com>
---
 libavcodec/truespeech.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 54352851b3..bbbf75f06e 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 = FFLSHIFT(out[i], 12);
         for(k = 0; k < 8; k++)
             sum += ptr0[k] * t[k];
         for(k = 7; k > 0; k--)
-- 
2.20.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to