Commit 73906514 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

input var: avoid implicit double upconversion

parent e5266153
...@@ -592,17 +592,17 @@ static int PositionCallback( vlc_object_t *p_this, char const *psz_cmd, ...@@ -592,17 +592,17 @@ static int PositionCallback( vlc_object_t *p_this, char const *psz_cmd,
if( !strcmp( psz_cmd, "position-offset" ) ) if( !strcmp( psz_cmd, "position-offset" ) )
{ {
float f_position = var_GetFloat( p_input, "position" ) + newval.f_float; float f_position = var_GetFloat( p_input, "position" ) + newval.f_float;
if( f_position < 0.0 ) if( f_position < 0.f )
f_position = 0.0; f_position = 0.f;
else if( f_position > 1.0 ) else if( f_position > 1.f )
f_position = 1.0; f_position = 1.f;
var_SetFloat( p_this, "position", f_position ); var_SetFloat( p_this, "position", f_position );
} }
else else
{ {
/* Update "length" for better intf behavour */ /* Update "length" for better intf behavour */
const mtime_t i_length = var_GetTime( p_input, "length" ); const mtime_t i_length = var_GetTime( p_input, "length" );
if( i_length > 0 && newval.f_float >= 0.0 && newval.f_float <= 1.0 ) if( i_length > 0 && newval.f_float >= 0.f && newval.f_float <= 1.f )
{ {
vlc_value_t val; vlc_value_t val;
......
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