cin audio: validate the channel count
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:

committed by
Michael Niedermayer

parent
8491677ab6
commit
711e6c947b
@@ -310,6 +310,11 @@ static av_cold int cinaudio_decode_init(AVCodecContext *avctx)
|
|||||||
CinAudioContext *cin = avctx->priv_data;
|
CinAudioContext *cin = avctx->priv_data;
|
||||||
|
|
||||||
cin->avctx = avctx;
|
cin->avctx = avctx;
|
||||||
|
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->initial_decode_frame = 1;
|
||||||
cin->delta = 0;
|
cin->delta = 0;
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
|
Reference in New Issue
Block a user