mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-03-13 09:00:40 +08:00
avcodec/evrcdec: 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:
@@ -239,6 +239,8 @@ static av_cold int evrc_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_FLT;
|
||||
if (!avctx->sample_rate)
|
||||
avctx->sample_rate = 8000;
|
||||
|
||||
for (i = 0; i < FILTER_ORDER; i++) {
|
||||
e->prev_lspf[i] = (i + 1) * 0.048;
|
||||
|
||||
Reference in New Issue
Block a user