avcodec/flacdec: Call ff_flacdsp_init() unconditionally

Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/100/head
Michael Niedermayer 10 years ago
parent 2ad38c6e02
commit e5c01ccdf5
  1. 2
      libavcodec/flacdec.c

@ -472,10 +472,10 @@ static int decode_frame(FLACContext *s)
ret = allocate_buffers(s);
if (ret < 0)
return ret;
ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->channels, s->bps);
s->got_streaminfo = 1;
dump_headers(s->avctx, (FLACStreaminfo *)s);
}
ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->channels, s->bps);
// dump_headers(s->avctx, (FLACStreaminfo *)s);

Loading…
Cancel
Save