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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 05e1619529)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-04 14:47:41 +01:00
parent 352d17086f
commit 657dc91b44
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ typedef struct {
static inline int64_t bs_get_v(const uint8_t **bs)
{
int64_t v = 0;
uint64_t v = 0;
int br = 0;
int c;
@ -108,7 +108,7 @@ static int mpc8_probe(AVProbeData *p)
static inline int64_t gb_get_v(GetBitContext *gb)
{
int64_t v = 0;
uint64_t v = 0;
int bits = 0;
while(get_bits1(gb) && bits < 64-7){
v <<= 7;