Commit 05e16195 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9f1a5dbc
...@@ -57,7 +57,7 @@ typedef struct { ...@@ -57,7 +57,7 @@ typedef struct {
static inline int64_t bs_get_v(const uint8_t **bs) static inline int64_t bs_get_v(const uint8_t **bs)
{ {
int64_t v = 0; uint64_t v = 0;
int br = 0; int br = 0;
int c; int c;
...@@ -108,7 +108,7 @@ static int mpc8_probe(AVProbeData *p) ...@@ -108,7 +108,7 @@ static int mpc8_probe(AVProbeData *p)
static inline int64_t gb_get_v(GetBitContext *gb) static inline int64_t gb_get_v(GetBitContext *gb)
{ {
int64_t v = 0; uint64_t v = 0;
int bits = 0; int bits = 0;
while(get_bits1(gb) && bits < 64-7){ while(get_bits1(gb) && bits < 64-7){
v <<= 7; v <<= 7;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment