avcodec/g728dec: init missing sample rate
Fixes: BAD BUILD: fuzzing /tmp/not-out/tmp0d_svy0e/ffmpeg_AV_CODEC_ID_G728_DEC_fuzzer with afl-fuzz failed Found-by: OSS-Fuzz Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
parent
c2f7dae70d
commit
286a3892a8
1 changed files with 2 additions and 0 deletions
|
|
@ -96,6 +96,8 @@ static av_cold int g728_decode_init(AVCodecContext *avctx)
|
|||
s->sbg[NSBGSZ - 1 -i] = -GOFF;
|
||||
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
|
||||
if (!avctx->sample_rate)
|
||||
avctx->sample_rate = 8000;
|
||||
|
||||
av_channel_layout_uninit(&avctx->ch_layout);
|
||||
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue