You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/vmdaudio: Fix channels count bug
Fixes: division by zero Fixes: 45811/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMDAUDIO_fuzzer-6412592581574656 Fixes: 45979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMDAUDIO_fuzzer-5362043060879360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -85,7 +85,7 @@ static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
av_channel_layout_uninit(&avctx->ch_layout);
|
av_channel_layout_uninit(&avctx->ch_layout);
|
||||||
av_channel_layout_default(&avctx->ch_layout, channels == 1);
|
av_channel_layout_default(&avctx->ch_layout, channels);
|
||||||
|
|
||||||
if (avctx->bits_per_coded_sample == 16)
|
if (avctx->bits_per_coded_sample == 16)
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
|
Reference in New Issue
Block a user