Mercurial > libavcodec.hg
comparison libfaac.c @ 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 | 85ab7655ad4d |
| children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
| 7894:340c33b1efaa | 7895:726e49d4d0ee |
|---|---|
| 36 FaacAudioContext *s = avctx->priv_data; | 36 FaacAudioContext *s = avctx->priv_data; |
| 37 faacEncConfigurationPtr faac_cfg; | 37 faacEncConfigurationPtr faac_cfg; |
| 38 unsigned long samples_input, max_bytes_output; | 38 unsigned long samples_input, max_bytes_output; |
| 39 | 39 |
| 40 /* number of channels */ | 40 /* number of channels */ |
| 41 if (avctx->channels < 1 || avctx->channels > 6) | 41 if (avctx->channels < 1 || avctx->channels > 6) { |
| 42 av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed\n", avctx->channels); | |
| 42 return -1; | 43 return -1; |
| 44 } | |
| 43 | 45 |
| 44 s->faac_handle = faacEncOpen(avctx->sample_rate, | 46 s->faac_handle = faacEncOpen(avctx->sample_rate, |
| 45 avctx->channels, | 47 avctx->channels, |
| 46 &samples_input, &max_bytes_output); | 48 &samples_input, &max_bytes_output); |
| 47 | 49 |
