[SCM] libav/experimental: use intptr_t to cast pointers to int in codecs maintained by benjamin larsson

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:41:36 UTC 2013


The following commit has been merged in the experimental branch:
commit e05c8d068203c7cba9afdffe851aa1732bb8a809
Author: Ramiro Polla <ramiro.polla at gmail.com>
Date:   Tue Mar 17 20:47:31 2009 +0000

    use intptr_t to cast pointers to int in codecs maintained by benjamin larsson
    
    Originally committed as revision 18027 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 81d25ec..bdb8a8a 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -230,7 +230,7 @@ static int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes){
     const uint32_t* buf;
     uint32_t* obuf = (uint32_t*) out;
 
-    off = (int)((long)inbuffer & 3);
+    off = (intptr_t)inbuffer & 3;
     buf = (const uint32_t*) (inbuffer - off);
     c = be2me_32((0x537F6103 >> (off*8)) | (0x537F6103 << (32-(off*8))));
     bytes += 3 + off;
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index e476ded..975607a 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -302,7 +302,7 @@ static inline int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes)
      *     (int64_t)out[i] = 0x37c511f237c511f2^be2me_64(int64_t)in[i]);
      * Buffer alignment needs to be checked. */
 
-    off = (int)((long)inbuffer & 3);
+    off = (intptr_t)inbuffer & 3;
     buf = (const uint32_t*) (inbuffer - off);
     c = be2me_32((0x37c511f2 >> (off*8)) | (0x37c511f2 << (32-(off*8))));
     bytes += 3 + off;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list