Commit fdf4ef95 authored by Clément Stenac's avatar Clément Stenac

Be sure to write correct time values

parent 5a6a6caf
...@@ -63,14 +63,14 @@ const string StreamTime::getAsStringCurrTime( bool bShortFormat ) const ...@@ -63,14 +63,14 @@ const string StreamTime::getAsStringCurrTime( bool bShortFormat ) const
return "-:--:--"; return "-:--:--";
} }
vlc_value_t pos; vlc_value_t pos; pos.f_float = 0.0;
var_Get( getIntf()->p_sys->p_input, "position", &pos ); var_Get( getIntf()->p_sys->p_input, "position", &pos );
if( pos.f_float == 0.0 ) if( pos.f_float == 0.0 )
{ {
return "-:--:--"; return "-:--:--";
} }
vlc_value_t time; vlc_value_t time; time.i_time = 0L;
var_Get( getIntf()->p_sys->p_input, "time", &time ); var_Get( getIntf()->p_sys->p_input, "time", &time );
return formatTime( time.i_time / 1000000, bShortFormat ); return formatTime( time.i_time / 1000000, bShortFormat );
...@@ -107,7 +107,7 @@ const string StreamTime::getAsStringDuration( bool bShortFormat ) const ...@@ -107,7 +107,7 @@ const string StreamTime::getAsStringDuration( bool bShortFormat ) const
return "-:--:--"; return "-:--:--";
} }
vlc_value_t pos; vlc_value_t pos; pos.f_float = 0.0;
var_Get( getIntf()->p_sys->p_input, "position", &pos ); var_Get( getIntf()->p_sys->p_input, "position", &pos );
if( pos.f_float == 0.0 ) if( pos.f_float == 0.0 )
{ {
......
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