Commit dab19048 authored by Michael Niedermayer's avatar Michael Niedermayer

mjpegdec: reset h/v_count, fix assertion failure.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e3edee6d
......@@ -263,6 +263,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
s->nb_components = nb_components;
s->h_max = 1;
s->v_max = 1;
memset(s->h_count, 0, sizeof(s->h_count));
memset(s->v_count, 0, sizeof(s->v_count));
for (i = 0; i < nb_components; i++) {
/* component id */
s->component_id[i] = get_bits(&s->gb, 8) - 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