1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

jpeglsdec: fix infinite loop

Fixes Ticket331

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-09-08 05:05:11 +02:00
parent 42d4df06e1
commit bd358e128f

View File

@ -86,6 +86,8 @@ static inline void ff_jpegls_downscale_state(JLSState *state, int Q){
}
static inline int ff_jpegls_update_state_regular(JLSState *state, int Q, int err){
if(FFABS(err) > 0xFFFF)
return -0x10000;
state->A[Q] += FFABS(err);
err *= state->twonear;
state->B[Q] += err;