1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

imc: set channels to 1 instead of validating it

This commit is contained in:
Justin Ruggles 2012-10-22 15:54:29 -04:00
parent 32c7769e5c
commit 1c7a016153

View File

@ -175,8 +175,10 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
IMCContext *q = avctx->priv_data; IMCContext *q = avctx->priv_data;
double r1, r2; double r1, r2;
if ((avctx->codec_id == AV_CODEC_ID_IMC && avctx->channels != 1) if (avctx->codec_id == AV_CODEC_ID_IMC)
|| (avctx->codec_id == AV_CODEC_ID_IAC && avctx->channels > 2)) { avctx->channels = 1;
if (avctx->channels > 2) {
av_log_ask_for_sample(avctx, "Number of channels is not supported\n"); av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;
} }