[FFmpeg-cvslog] avcodec/h264: Fix undefined shifts in pack16to32() and pack8to16()

Michael Niedermayer git at videolan.org
Tue Mar 10 21:27:18 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 10 21:15:05 2015 +0100| [eb7960b2bd36c9a3a2c00d5cf57ee6bcaacd02c1] | committer: Michael Niedermayer

avcodec/h264: Fix undefined shifts in pack16to32() and pack8to16()

Reported-by: Thierry Foucu <tfoucu at google.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 21e9952..8496f0b 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -949,7 +949,7 @@ static const uint8_t scan8[16 * 3 + 3] = {
     0 +  0 * 8, 0 +  5 * 8, 0 + 10 * 8
 };
 
-static av_always_inline uint32_t pack16to32(int a, int b)
+static av_always_inline uint32_t pack16to32(unsigned a, unsigned b)
 {
 #if HAVE_BIGENDIAN
     return (b & 0xFFFF) + (a << 16);
@@ -958,7 +958,7 @@ static av_always_inline uint32_t pack16to32(int a, int b)
 #endif
 }
 
-static av_always_inline uint16_t pack8to16(int a, int b)
+static av_always_inline uint16_t pack8to16(unsigned a, unsigned b)
 {
 #if HAVE_BIGENDIAN
     return (b & 0xFF) + (a << 8);



More information about the ffmpeg-cvslog mailing list