diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-21 00:22:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-06 11:30:43 +0100 |
commit | dfb5dc40734a22b51beb9bffa72997a1924c7c00 (patch) | |
tree | e186e94779de23575d0f3becca8387516ba3290f | |
parent | d47c4185d5638eb5e99cf2a3a5b8796c13bab6a7 (diff) | |
download | ffmpeg-dfb5dc40734a22b51beb9bffa72997a1924c7c00.tar.gz |
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/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e85eb7cb04cefa37c7f8e78aac381aa8377dea0f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/atrac9dec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c index b42bb07f23..f728f383d5 100644 --- a/libavcodec/atrac9dec.c +++ b/libavcodec/atrac9dec.c @@ -876,6 +876,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)) { |