mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00:00
cin audio: validate the channel count
This commit is contained in:
parent
664eb77dc3
commit
03381c12b3
@ -307,6 +307,11 @@ static av_cold int cinaudio_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
CinAudioContext *cin = avctx->priv_data;
|
||||
|
||||
if (avctx->channels != 1) {
|
||||
av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
cin->initial_decode_frame = 1;
|
||||
cin->delta = 0;
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
|
Loading…
Reference in New Issue
Block a user