summaryrefslogtreecommitdiff
path: root/libavcodec/libfaac.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-09-20 11:13:14 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-09-20 11:13:14 +0000
commit2c006f438042435ec67012d6b78f0374e94180bf (patch)
tree2d3f68b7996563d93974ce6372d2d1bec1de4223 /libavcodec/libfaac.c
parenta85d0c84a4ab8ced8f977c9c63d7df0cb188ac4f (diff)
Log an error message in case of invalid number of channels.
Originally committed as revision 15371 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/libfaac.c')
-rw-r--r--libavcodec/libfaac.c4
1 files changed, 3 insertions, 1 deletions
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,