[FFmpeg-cvslog] mjpegdec: reset h/v_count, fix assertion failure.
Michael Niedermayer
git at videolan.org
Sun Nov 18 06:04:31 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 17 21:07:39 2012 +0100| [dab19048a1fb8e722cd2029b63ce1fc9d84ff41e] | committer: Michael Niedermayer
mjpegdec: reset h/v_count, fix assertion failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dab19048a1fb8e722cd2029b63ce1fc9d84ff41e
---
libavcodec/mjpegdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ae0e504..915347d 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;
More information about the ffmpeg-cvslog
mailing list