mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
Log an error message in case of invalid number of channels.
Originally committed as revision 15371 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a85d0c84a4
commit
2c006f4380
@ -38,8 +38,10 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
|
|||||||
unsigned long samples_input, max_bytes_output;
|
unsigned long samples_input, max_bytes_output;
|
||||||
|
|
||||||
/* number of channels */
|
/* 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;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
s->faac_handle = faacEncOpen(avctx->sample_rate,
|
s->faac_handle = faacEncOpen(avctx->sample_rate,
|
||||||
avctx->channels,
|
avctx->channels,
|
||||||
|
Loading…
Reference in New Issue
Block a user