1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-10-04 01:30:05 +02:00

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:
Michael Niedermayer 2012-03-27 00:44:32 +02:00
parent 43fd321252
commit d6eef545c1

View File

@ -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; \
} \
}
/**