Mercurial > libavutil.hg
changeset 908:de9d2bfb3ceb libavutil
Fix broken 32-bit clipping, and write numbers in hex instead of decimal so
they are easier to understand. Also give the add a 'u' postfix to silence
a pre-c99 compiler warning.
author | rbultje |
---|---|
date | Mon, 26 Apr 2010 13:36:17 +0000 |
parents | 3f0ed02fff47 |
children | 73a9ad2a11bd |
files | common.h |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/common.h Fri Apr 23 21:27:26 2010 +0000 +++ b/common.h Mon Apr 26 13:36:17 2010 +0000 @@ -151,7 +151,7 @@ */ static inline av_const int32_t av_clipl_int32(int64_t a) { - if ((a+2147483648) & ~2147483647) return (a>>63) ^ 2147483647; + if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF; else return a; }