jpegdec: Fix vlc table check for progressive jpegs.

Fixes Ticket834

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 15b219fae9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-01-03 06:53:18 +01:00
parent 9f9b6388a3
commit 66569b375c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}