Commit e85eb7cb authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/atrac9dec: Set channels

Fixes: null pointer dereference
Fixes: 18341/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5681203490848768

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegReviewed-by: 's avatarLynne <dev@lynne.ee>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6079bd5c
......@@ -873,6 +873,7 @@ static av_cold int atrac9_decode_init(AVCodecContext *avctx)
s->block_config = &at9_block_layout[block_config_idx];
avctx->channel_layout = s->block_config->channel_layout;
avctx->channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
if (get_bits1(&gb)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment