vc1dec: move mquant zero check down.
This way it catches all cases, and prevents later segfaults. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
43fd321252
commit
d6eef545c1
@ -1032,10 +1032,6 @@ static void vc1_mc_4mv_chroma4(VC1Context *v)
|
||||
mquant = v->pq + mqdiff; \
|
||||
else \
|
||||
mquant = get_bits(gb, 5); \
|
||||
if (!mquant) { \
|
||||
av_log(v->s.avctx,AV_LOG_ERROR, "zero mquant\n"); \
|
||||
mquant = 1; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
if (v->dqprofile == DQPROFILE_SINGLE_EDGE) \
|
||||
@ -1052,6 +1048,10 @@ static void vc1_mc_4mv_chroma4(VC1Context *v)
|
||||
mquant = v->altpq; \
|
||||
if ((edges&8) && s->mb_y == (s->mb_height - 1)) \
|
||||
mquant = v->altpq; \
|
||||
if (!mquant) { \
|
||||
av_log(v->s.avctx,AV_LOG_ERROR, "zero mquant\n"); \
|
||||
mquant = 1; \
|
||||
} \
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user