aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-03 06:53:18 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-04 22:18:01 +0100
commit66569b375c5c54a9893737a5e3c3b9806b6a56f8 (patch)
tree88942297397479174b2a67808e95eff6071cac56
parent9f9b6388a3a55d2fe5bae045949c98ec911d16e6 (diff)
downloadffmpeg-66569b375c5c54a9893737a5e3c3b9806b6a56f8.tar.gz
jpegdec: Fix vlc table check for progressive jpegs.
Fixes Ticket834 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 15b219fae9da1691dfb264f51637805e1ca63d1a) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 41722c425a..833e80fcdf 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1069,7 +1069,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;
}