[FFmpeg-cvslog] Fixed warnings about int64 to int32 conversion

Michael Bradshaw git at videolan.org
Fri May 25 05:09:55 CEST 2012


ffmpeg | branch: master | Michael Bradshaw <mbradshaw at sorensonmedia.com> | Wed May 16 11:39:20 2012 -0600| [b0e1557fe7b10fdd34afd4ba548019c29725e607] | committer: Michael Niedermayer

Fixed warnings about int64 to int32 conversion

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0e1557fe7b10fdd34afd4ba548019c29725e607
---

 libavutil/common.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavutil/common.h b/libavutil/common.h
index f4fcc9c..a11a325 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -171,7 +171,7 @@ static av_always_inline av_const int16_t av_clip_int16_c(int a)
 static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
 {
     if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
-    else                                         return a;
+    else                                         return (int32_t)a;
 }
 
 /**
@@ -230,7 +230,7 @@ static av_always_inline av_const int av_popcount_c(uint32_t x)
  */
 static av_always_inline av_const int av_popcount64_c(uint64_t x)
 {
-    return av_popcount(x) + av_popcount(x >> 32);
+    return av_popcount((uint32_t)x) + av_popcount(x >> 32);
 }
 
 #define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((unsigned)(d) << 24))



More information about the ffmpeg-cvslog mailing list