summaryrefslogtreecommitdiff
path: root/libavcodec/libfaac.c
diff options
context:
space:
mode:
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,