mirror of https://git.ffmpeg.org/ffmpeg.git
ws_snd: make sure number of channels is 1
This commit is contained in:
parent
417364ce1f
commit
6a818cb3ff
|
@ -41,6 +41,11 @@ static av_cold int ws_snd_decode_init(AVCodecContext * avctx)
|
||||||
{
|
{
|
||||||
// WSSNDContext *c = avctx->priv_data;
|
// WSSNDContext *c = avctx->priv_data;
|
||||||
|
|
||||||
|
if (avctx->channels != 1) {
|
||||||
|
av_log_ask_for_sample(avctx, "unsupported number of channels\n");
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue