avcodec/jpegls: clear more JLSState fields inside ff_jpegls_init_state()

This commit is contained in:
Ramiro Polla
2025-12-29 19:50:54 +01:00
parent 3f2d4b49e6
commit 851cb118da
2 changed files with 4 additions and 1 deletions

View File

@@ -49,6 +49,10 @@ void ff_jpegls_init_state(JLSState *state)
state->A[i] = FFMAX(state->range + 32 >> 6, 2);
state->N[i] = 1;
}
memset(state->B, 0, sizeof(state->B));
memset(state->C, 0, sizeof(state->C));
memset(state->run_index, 0, sizeof(state->run_index));
}
/**

View File

@@ -376,7 +376,6 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s)
cur = s->picture_ptr->data[0];
/* initialize JPEG-LS state from JPEG parameters */
memset(state, 0, sizeof(*state));
state->near = near;
state->bpp = (s->bits < 2) ? 2 : s->bits;
state->maxval = s->maxval;