diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-01-20 20:20:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-21 10:01:46 +0100 |
commit | 59a9d65e0d790821f88527a82569f56eb2f8a9be (patch) | |
tree | dfebdd362acebc6ee3b6d8294557e23e4f7ac4b1 /doc/examples/hw_decode.c | |
parent | 3ad8af51b7c0a968ac3fd62964780d4ff9136c5a (diff) | |
download | ffmpeg-59a9d65e0d790821f88527a82569f56eb2f8a9be.tar.gz |
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>
Diffstat (limited to 'doc/examples/hw_decode.c')
0 files changed, 0 insertions, 0 deletions