mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-07 07:40:16 +00:00
Merge commit 'f3fdef108eb06b1e71b29152bf6822519e787efe'
* commit 'f3fdef108eb06b1e71b29152bf6822519e787efe': ape: Avoid undefined behaviour Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
commit
22900770c5
@ -1284,7 +1284,7 @@ static void do_apply_filter(APEContext *ctx, int version, APEFilter *f,
|
|||||||
/* Update the adaption coefficients */
|
/* Update the adaption coefficients */
|
||||||
absres = FFABS(res);
|
absres = FFABS(res);
|
||||||
if (absres)
|
if (absres)
|
||||||
*f->adaptcoeffs = ((res & INT32_MIN) ^ (-(1<<30))) >>
|
*f->adaptcoeffs = ((res & INT32_MIN) ^ ((~0UL) << 30)) >>
|
||||||
(25 + (absres <= f->avg*3) + (absres <= f->avg*4/3));
|
(25 + (absres <= f->avg*3) + (absres <= f->avg*4/3));
|
||||||
else
|
else
|
||||||
*f->adaptcoeffs = 0;
|
*f->adaptcoeffs = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user