[vlc-devel] commit: twolame: "quality" is a float variable and not an integer ! ( Rémi Duraffort )

git version control git at videolan.org
Sat Oct 10 11:57:44 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Oct  4 20:19:07 2009 +0200| [2987efc5a058634a793bd89c608021a3350d77df] | committer: Rémi Duraffort 

twolame: "quality" is a float variable and not an integer !

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2987efc5a058634a793bd89c608021a3350d77df
---

 modules/codec/twolame.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/modules/codec/twolame.c b/modules/codec/twolame.c
index 51318f3..4f9015d 100644
--- a/modules/codec/twolame.c
+++ b/modules/codec/twolame.c
@@ -177,16 +177,13 @@ static int OpenEncoder( vlc_object_t *p_this )
     twolame_set_in_samplerate( p_sys->p_twolame, p_enc->fmt_out.audio.i_rate );
     twolame_set_out_samplerate( p_sys->p_twolame, p_enc->fmt_out.audio.i_rate );
 
-    var_Get( p_enc, ENC_CFG_PREFIX "vbr", &val );
-    if ( val.b_bool )
+    if( var_GetBool( p_enc, ENC_CFG_PREFIX "vbr" ) )
     {
-        float i_quality;
-        var_Get( p_enc, ENC_CFG_PREFIX "quality", &val );
-        i_quality = val.i_int;
-        if ( i_quality > 50.0 ) i_quality = 50.0;
-        if ( i_quality < 0.0 ) i_quality = 0.0;
+        float f_quality = var_GetFloat( p_enc, ENC_CFG_PREFIX "quality" );
+        if ( f_quality > 50.0 ) f_quality = 50.0;
+        if ( f_quality < 0.0 ) f_quality = 0.0;
         twolame_set_VBR( p_sys->p_twolame, 1 );
-        twolame_set_VBR_q( p_sys->p_twolame, i_quality );
+        twolame_set_VBR_q( p_sys->p_twolame, f_quality );
     }
     else
     {




More information about the vlc-devel mailing list