summaryrefslogtreecommitdiff
path: root/libavutil/common.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2010-04-26 13:36:17 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2010-04-26 13:36:17 +0000
commit2d0525c27cc5542fdf3fd8c5edb5a4e41bd663ef (patch)
tree1e37da01f74112f698053bbc752a10602ab25f55 /libavutil/common.h
parent0a6a282a512ca44658db121b7597ae0e70d8a273 (diff)
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. Originally committed as revision 22965 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/common.h')
-rw-r--r--libavutil/common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/common.h b/libavutil/common.h
index 8d7cc10012..dd1c22396e 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -151,7 +151,7 @@ static inline av_const int16_t av_clip_int16(int a)
*/
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;
}