aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2010-06-04 22:40:31 +0000
committerDavid Conrad <lessen42@gmail.com>2010-06-04 22:40:31 +0000
commite5a5ea9e894c23f6224fceaef89e105f2c672396 (patch)
tree56a82aba09a1313bf41668fd96ee5e64f78acc86 /libavcodec
parent160c896c38ee39a4e6353f5b4c392eccebeb0e42 (diff)
downloadffmpeg-e5a5ea9e894c23f6224fceaef89e105f2c672396.tar.gz
libvorbis: Hook up min/max bitrate
Originally committed as revision 23469 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libvorbis.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index 81d328af4e..6772ee4b39 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -60,9 +60,12 @@ static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avcco
avccontext->global_quality / (float)FF_QP2LAMBDA / 10.0))
return -1;
} else {
+ int minrate = avccontext->rc_min_rate > 0 ? avccontext->rc_min_rate : -1;
+ int maxrate = avccontext->rc_min_rate > 0 ? avccontext->rc_max_rate : -1;
+
/* constant bitrate */
if(vorbis_encode_setup_managed(vi, avccontext->channels,
- avccontext->sample_rate, -1, avccontext->bit_rate, -1))
+ avccontext->sample_rate, minrate, avccontext->bit_rate, maxrate))
return -1;
#ifdef OGGVORBIS_VBR_BY_ESTIMATE