From c2f7dae70d27a8f5ca1e3fa43d96ff5c8bf032fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Sat, 9 Aug 2025 17:09:57 +0200 Subject: [PATCH] avcodec/g726: init missing sample rate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 416134551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_G726_DEC_fuzzer-5695764455292928 Found-by: OSS-Fuzz Signed-off-by: Kacper Michajłow --- libavcodec/g726.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/g726.c b/libavcodec/g726.c index 5491b7eb7a..f41df3073f 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -455,6 +455,8 @@ static av_cold int g726_decode_init(AVCodecContext *avctx) g726_reset(c); avctx->sample_fmt = AV_SAMPLE_FMT_S16; + if (!avctx->sample_rate) + avctx->sample_rate = 8000; return 0; }