# HG changeset patch # User rbultje # Date 1272288977 0 # Node ID de9d2bfb3ceb01dba5788bb41b4da50a6e969c25 # Parent 3f0ed02fff47d0990050a12e8d80a7bb9dded6bb 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. diff -r 3f0ed02fff47 -r de9d2bfb3ceb common.h --- 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; }