Commit 2c006f43 authored by Stefano Sabatini's avatar Stefano Sabatini

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

Originally committed as revision 15371 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a85d0c84
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment