avcodec/avdct: Clear IDCTDSPContext context

Fixes use of uninitialized variable and segfault

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b82825eba8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2020-01-27 21:54:22 +01:00
parent bbd445320a
commit ebbce3fa18
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ int avcodec_dct_init(AVDCT *dsp)
#if CONFIG_IDCTDSP
{
IDCTDSPContext idsp;
IDCTDSPContext idsp = {0};
ff_idctdsp_init(&idsp, avctx);
COPY(idsp, idct);
COPY(idsp, idct_permutation);