summaryrefslogtreecommitdiff
path: root/libavcodec/libvorbis.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-02-28 18:52:30 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-02-29 14:44:15 -0500
commit182d4f1f3855460ee8634ea052f33332cf9d174e (patch)
treee13aeb15a6ddb3075022473e878889879a15e8e3 /libavcodec/libvorbis.c
parenteb35ef2932e42d9b203a8bf9e5dba6f1c666ce1e (diff)
libvorbis: fix use of minrate/maxrate AVOptions
- enable the options for audio encoding - properly check for user-set maxrate - use correct calling order in vorbis_encode_setup_managed()
Diffstat (limited to 'libavcodec/libvorbis.c')
-rw-r--r--libavcodec/libvorbis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index e519a1dbb8..030da2a6d5 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -93,12 +93,12 @@ static av_cold int oggvorbis_init_encoder(vorbis_info *vi,
goto error;
} else {
int minrate = avctx->rc_min_rate > 0 ? avctx->rc_min_rate : -1;
- int maxrate = avctx->rc_min_rate > 0 ? avctx->rc_max_rate : -1;
+ int maxrate = avctx->rc_max_rate > 0 ? avctx->rc_max_rate : -1;
/* average bitrate */
if ((ret = vorbis_encode_setup_managed(vi, avctx->channels,
- avctx->sample_rate, minrate,
- avctx->bit_rate, maxrate)))
+ avctx->sample_rate, maxrate,
+ avctx->bit_rate, minrate)))
goto error;
/* variable bitrate by estimate, disable slow rate management */