mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avcodec/qcelpdec: set missing sample rate
Commit f566032bfd added frame validation.
Since then this decoder has been failing validation of sample rate
value.
Found by OSS-Fuzz.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
@@ -63,6 +63,8 @@ static av_cold int g722_decode_init(AVCodecContext * avctx)
|
||||
av_channel_layout_uninit(&avctx->ch_layout);
|
||||
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
if (!avctx->sample_rate)
|
||||
avctx->sample_rate = 16000;
|
||||
|
||||
c->band[0].scale_factor = 8;
|
||||
c->band[1].scale_factor = 2;
|
||||
|
||||
Reference in New Issue
Block a user