aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2025-08-09 17:11:25 +0200
committerKacper Michajłow <kasper93@gmail.com>2025-08-11 20:31:09 +0200
commit286a3892a854d6225764f13c71723459b2b0334f (patch)
tree5a3fe62e4fcf3be1083913713fca613d3405758f
parentc2f7dae70d27a8f5ca1e3fa43d96ff5c8bf032fa (diff)
downloadffmpeg-286a3892a854d6225764f13c71723459b2b0334f.tar.gz
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>
-rw-r--r--libavcodec/g728dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/g728dec.c b/libavcodec/g728dec.c
index 9ab650f2cb..6403bcae46 100644
--- a/libavcodec/g728dec.c
+++ b/libavcodec/g728dec.c
@@ -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;