avcodec/dsicinaudio: 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
96ab006566
commit
4718974055
1 changed files with 2 additions and 0 deletions
|
|
@ -81,6 +81,8 @@ static av_cold int cinaudio_decode_init(AVCodecContext *avctx)
|
|||
cin->initial_decode_frame = 1;
|
||||
cin->delta = 0;
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
if (!avctx->sample_rate)
|
||||
avctx->sample_rate = 8000;
|
||||
av_channel_layout_uninit(&avctx->ch_layout);
|
||||
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue