mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
mjpegdec: reset h/v_count, fix assertion failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e3edee6d2f
commit
dab19048a1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user