diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-17 21:07:39 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-18 06:00:44 +0100 |
commit | dab19048a1fb8e722cd2029b63ce1fc9d84ff41e (patch) | |
tree | 69a2afb65ff9ed68468e7a9bb4f88f4609986ad3 /libavcodec | |
parent | e3edee6d2fcfd0146c5da276086c9409e25e8b8a (diff) | |
download | ffmpeg-dab19048a1fb8e722cd2029b63ce1fc9d84ff41e.tar.gz |
mjpegdec: reset h/v_count, fix assertion failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpegdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index ae0e504674..915347d321 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -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; |