Mercurial > libavcodec.hg
changeset 7895:726e49d4d0ee libavcodec
Log an error message in case of invalid number of channels.
author | stefano |
---|---|
date | Sat, 20 Sep 2008 11:13:14 +0000 |
parents | 340c33b1efaa |
children | 3557386b7a97 |
files | libfaac.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,