[FFmpeg-devel] [PATCH] Improve libfaac error reporting in case of invalid number of channels
Stefano Sabatini
stefano.sabatini-lala
Tue Sep 16 20:15:49 CEST 2008
On date Monday 2008-09-15 22:57:49 +0200, Stefano Sabatini encoded:
> Hi, as in subject.
>
> Regards.
> --
> FFmpeg = Fantastic Funny Mind-dumbing Purposeless Embarassing Genius
> Index: libavcodec/libfaac.c
> ===================================================================
> --- libavcodec/libfaac.c (revision 15333)
> +++ libavcodec/libfaac.c (working copy)
> @@ -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,
If no one disagrees I'll apply it in three days.
Regards.
--
FFmpeg = Foolish Faboulous Maxi Picky Everlasting Gangster
More information about the ffmpeg-devel
mailing list