[FFmpeg-devel] [PATCH] jpegdec: Fix vlc table check for progressive jpegs.
Michael Niedermayer
michaelni at gmx.at
Tue Jan 3 06:54:07 CET 2012
Fixes Ticket834
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/mjpegdec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 580d803..464c48d 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1073,7 +1073,7 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s,
if (s->dc_index[i] < 0 || s->ac_index[i] < 0 ||
s->dc_index[i] >= 4 || s->ac_index[i] >= 4)
goto out_of_range;
- if (!s->vlcs[0][s->dc_index[i]].table || !s->vlcs[1][s->ac_index[i]].table)
+ if (!s->vlcs[0][s->dc_index[i]].table || !(s->progressive ? s->vlcs[2][s->ac_index[0]].table : s->vlcs[1][s->ac_index[i]].table))
goto out_of_range;
}
--
1.7.5.4
More information about the ffmpeg-devel
mailing list