aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Converse <aconverse@google.com>2011-04-26 09:08:26 -0700
committerAlex Converse <alex.converse@gmail.com>2011-06-10 13:04:25 -0700
commit19d824e47373594739bb9a05cd4e7edbc441b173 (patch)
tree2e5a693e38c79fc918f4c0f031148ddbf2847633
parent103278f7b0b037a4a6184865ca9b8d021ec9be85 (diff)
downloadffmpeg-19d824e47373594739bb9a05cd4e7edbc441b173.tar.gz
bitstream: Properly promote av_reverse values before shifting.
-rw-r--r--libavcodec/bitstream.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index 97d5b49105..b593db55ce 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -116,10 +116,10 @@ static int alloc_table(VLC *vlc, int size, int use_static)
}
static av_always_inline uint32_t bitswap_32(uint32_t x) {
- return av_reverse[x&0xFF]<<24
- | av_reverse[(x>>8)&0xFF]<<16
- | av_reverse[(x>>16)&0xFF]<<8
- | av_reverse[x>>24];
+ return (uint32_t)av_reverse[x&0xFF]<<24
+ | (uint32_t)av_reverse[(x>>8)&0xFF]<<16
+ | (uint32_t)av_reverse[(x>>16)&0xFF]<<8
+ | (uint32_t)av_reverse[x>>24];
}
typedef struct {