mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-10-19 18:03:17 +00: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:
parent
7f5db34f3b
commit
8b5db38dc6
1 changed files with 2 additions and 0 deletions
|
@ -89,6 +89,8 @@ static av_cold int qcelp_decode_init(AVCodecContext *avctx)
|
||||||
av_channel_layout_uninit(&avctx->ch_layout);
|
av_channel_layout_uninit(&avctx->ch_layout);
|
||||||
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
|
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
|
avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
|
||||||
|
if (!avctx->sample_rate)
|
||||||
|
avctx->sample_rate = 8000;
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
q->prev_lspf[i] = (i + 1) / 11.0;
|
q->prev_lspf[i] = (i + 1) / 11.0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue