Commit 2987efc5 authored by Rémi Duraffort's avatar Rémi Duraffort

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

parent bfbf8a97
...@@ -177,16 +177,13 @@ static int OpenEncoder( vlc_object_t *p_this ) ...@@ -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_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 ); 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( var_GetBool( p_enc, ENC_CFG_PREFIX "vbr" ) )
if ( val.b_bool )
{ {
float i_quality; float f_quality = var_GetFloat( p_enc, ENC_CFG_PREFIX "quality" );
var_Get( p_enc, ENC_CFG_PREFIX "quality", &val ); if ( f_quality > 50.0 ) f_quality = 50.0;
i_quality = val.i_int; if ( f_quality < 0.0 ) f_quality = 0.0;
if ( i_quality > 50.0 ) i_quality = 50.0;
if ( i_quality < 0.0 ) i_quality = 0.0;
twolame_set_VBR( p_sys->p_twolame, 1 ); 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 else
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment