Log an error message in case of invalid number of channels.

Originally committed as revision 15371 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefano Sabatini 2008-09-20 11:13:14 +00:00
parent a85d0c84a4
commit 2c006f4380

View File

@ -38,8 +38,10 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
unsigned long samples_input, max_bytes_output;
/* number of channels */
if (avctx->channels < 1 || avctx->channels > 6)
if (avctx->channels < 1 || avctx->channels > 6) {
av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n", avctx->channels);
return -1;
}
s->faac_handle = faacEncOpen(avctx->sample_rate,
avctx->channels,