[FFmpeg-cvslog] mjpegdec: fix memcmp size for *_count
Michael Niedermayer
git at videolan.org
Sun Jan 27 23:56:25 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 27 21:52:24 2013 +0100| [8888c72fcfe1419668cc41dca4399374e6c09680] | committer: Michael Niedermayer
mjpegdec: fix memcmp size for *_count
Fixes 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=8888c72fcfe1419668cc41dca4399374e6c09680
---
libavcodec/mjpegdec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 3042eb3..fc428df 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -303,8 +303,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
/* if different size, realloc/alloc picture */
if ( width != s->width || height != s->height
- || memcmp(s->h_count, h_count, sizeof(h_count[0])*nb_components)
- || memcmp(s->v_count, v_count, sizeof(v_count[0])*nb_components)) {
+ || memcmp(s->h_count, h_count, sizeof(h_count))
+ || memcmp(s->v_count, v_count, sizeof(v_count))) {
av_freep(&s->qscale_table);
s->width = width;
More information about the ffmpeg-cvslog
mailing list