From 13811b19d6b45e00ff739329b6fa52ba0fefef9f Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Wed, 13 Feb 2013 12:16:47 +0100 Subject: [PATCH] lavc/libopusenc: report an error if global_quality is set. --- libavcodec/libopusenc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c index d198798929..a4aa37cdd4 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -107,6 +107,13 @@ static int libopus_configure_encoder(AVCodecContext *avctx, OpusMSEncoder *enc, { int ret; + if (avctx->global_quality) { + av_log(avctx, AV_LOG_ERROR, + "Quality-based encoding not supported, " + "please specify a bitrate and VBR setting.\n"); + return AVERROR(EINVAL); + } + ret = opus_multistream_encoder_ctl(enc, OPUS_SET_BITRATE(avctx->bit_rate)); if (ret != OPUS_OK) { av_log(avctx, AV_LOG_ERROR,