1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavc/libopusenc: report an error if global_quality is set.

This commit is contained in:
Nicolas George 2013-02-13 12:16:47 +01:00
parent f102c24d90
commit 13811b19d6

View File

@ -107,6 +107,13 @@ static int libopus_configure_encoder(AVCodecContext *avctx, OpusMSEncoder *enc,
{ {
int ret; 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)); ret = opus_multistream_encoder_ctl(enc, OPUS_SET_BITRATE(avctx->bit_rate));
if (ret != OPUS_OK) { if (ret != OPUS_OK) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,