Commit d6eef545 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 43fd3212
......@@ -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; \
} \
}
/**
......
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