Commit 22900770 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit 'f3fdef10'

* commit 'f3fdef10':
  ape: Avoid undefined behaviour
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 3fd5f098 f3fdef10
......@@ -1284,7 +1284,7 @@ static void do_apply_filter(APEContext *ctx, int version, APEFilter *f,
/* Update the adaption coefficients */
absres = FFABS(res);
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));
else
*f->adaptcoeffs = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment