# HG changeset patch # User stefano # Date 1221909194 0 # Node ID 726e49d4d0eec84340106dd72a23948b9806d15e # Parent 340c33b1efaa410c989c9ee12b9899be35c2abba Log an error message in case of invalid number of channels. diff -r 340c33b1efaa -r 726e49d4d0ee libfaac.c --- a/libfaac.c Fri Sep 19 18:53:31 2008 +0000 +++ b/libfaac.c Sat Sep 20 11:13:14 2008 +0000 @@ -38,8 +38,10 @@ 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,