1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00
FFmpeg/libavcodec
Andreas Rheinhardt 30cf495505 avcodec/adxenc: Avoid undefined left shift of negative numbers
Replace "((a << shift) + b) >> shift" by "a + (b >> shift)". This avoids
a left shift which also happens to trigger undefined behaviour in case "a"
is negative. This affected the FATE-tests acodec-adpcm-adx and
acodec-adpcm-adx-trellis; it also fixes ticket #8008.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 59a9d65e0d790821f88527a82569f56eb2f8a9be)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-02 23:44:51 +02:00
..
2020-07-02 19:55:09 +02:00
2020-07-02 19:55:09 +02:00
2020-07-02 19:55:10 +02:00
2020-07-02 19:55:09 +02:00
2020-07-02 19:55:10 +02:00
2020-07-02 19:55:09 +02:00
2020-07-02 19:55:09 +02:00