Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2013-02-13 15:16:47 +0400
committerNicolas George <nicolas.george@normalesup.org>2013-02-27 22:01:34 +0400
commit13811b19d6b45e00ff739329b6fa52ba0fefef9f (patch)
treecaa9b38a313a0fbc4df11eab0151ecbe13f07b9c /libavcodec
parentf102c24d9040b94eb8a561fbd40f0e61b808703e (diff)
lavc/libopusenc: report an error if global_quality is set.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libopusenc.c7
1 files changed, 7 insertions, 0 deletions
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,