On 11/11/14 13:26, Vittorio Giovara wrote:
> CC: [email protected]
> Bug-Id: CID 1244188
> ---
>  libavcodec/libopusenc.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
> index 8447206..9103677 100644
> --- a/libavcodec/libopusenc.c
> +++ b/libavcodec/libopusenc.c
> @@ -163,10 +163,11 @@ static int av_cold libopus_encode_init(AVCodecContext 
> *avctx)
>  
>      /* FIXME: Opus can handle up to 255 channels. However, the mapping for
>       * anything greater than 8 is undefined. */
> -    if (avctx->channels > 8)
> -        av_log(avctx, AV_LOG_WARNING,
> +    if (avctx->channels > 8) {
> +        av_log(avctx, AV_LOG_ERROR,
>                 "Channel layout undefined for %d channels.\n", 
> avctx->channels);
> -
> +        return AVERROR_INVALIDDATA;
> +    }
>      if (!avctx->bit_rate) {
>          /* Sane default copied from opusenc */
>          avctx->bit_rate = 64000 * opus->stream_count +
> 

return ENOSYS or PATCHWELCOME please.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to