From afa20a78b20e71699ac56f28da54562769bcdbcc Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 21 Nov 2005 15:16:29 +0000 Subject: [PATCH] ext/vorbis/vorbisenc.c: Minimal fix for bug #320200: set the min/max bitrate in the correct units. A better fix would... Original commit message from CVS: * ext/vorbis/vorbisenc.c: (gst_vorbisenc_setup): Minimal fix for bug #320200: set the min/max bitrate in the correct units. A better fix would be to upgrade to the RATEMANAGE2 interface, rather than using the deprecated interface used here, but that would require an update in our libvorbis dependency (to 1.1), which is probably undesirable. --- ChangeLog | 9 +++++++++ ext/vorbis/vorbisenc.c | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4a9cd0f7a..4b5ff0a3f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-11-21 Michael Smith + + * ext/vorbis/vorbisenc.c: (gst_vorbisenc_setup): + Minimal fix for bug #320200: set the min/max bitrate in the correct + units. A better fix would be to upgrade to the RATEMANAGE2 + interface, rather than using the deprecated interface used here, but + that would require an update in our libvorbis dependency (to 1.1), + which is probably undesirable. + 2005-11-21 Jan Schmidt * ext/libvisual/visual.c: (get_buffer): diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index 603ee46e0f..27e9cc2267 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -732,10 +732,8 @@ gst_vorbisenc_setup (GstVorbisEnc * vorbisenc) vorbis_encode_ctl (&vorbisenc->vi, OV_ECTL_RATEMANAGE_GET, &ai); - /* the bitrates used by libvorbisenc are in kbit/sec, ours in bit/sec - * also remember that in telecom kbit/sec is 1000 bit/sec */ - ai.bitrate_hard_min = vorbisenc->min_bitrate / 1000; - ai.bitrate_hard_max = vorbisenc->max_bitrate / 1000; + ai.bitrate_hard_min = vorbisenc->min_bitrate; + ai.bitrate_hard_max = vorbisenc->max_bitrate; ai.management_active = 1; vorbis_encode_ctl (&vorbisenc->vi, OV_ECTL_RATEMANAGE_SET, &ai);