From 2c006f438042435ec67012d6b78f0374e94180bf Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 20 Sep 2008 11:13:14 +0000 Subject: Log an error message in case of invalid number of channels. Originally committed as revision 15371 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/libfaac.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/libfaac.c') diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c index 2ed4f765f9..369addd6a2 100644 --- a/libavcodec/libfaac.c +++ b/libavcodec/libfaac.c @@ -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, -- cgit v1.2.3