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:
Kacper Michajłow 2025-08-09 17:11:25 +02:00
parent c2f7dae70d
commit 286a3892a8
No known key found for this signature in database
GPG key ID: 6580132338ABD4E2

View file

@ -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;