]> git.sesse.net Git - vlc/commitdiff
Be sure to write correct time values
authorClément Stenac <zorglub@videolan.org>
Sat, 29 Apr 2006 13:31:39 +0000 (13:31 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 29 Apr 2006 13:31:39 +0000 (13:31 +0000)
modules/gui/skins2/vars/time.cpp

index b2061c8102c9befecafa175adf738a0c0f810cec..57eb8da9e3d2e50cf6c4e909672e54c0a3a0e29d 100644 (file)
@@ -63,14 +63,14 @@ const string StreamTime::getAsStringCurrTime( bool bShortFormat ) const
         return "-:--:--";
     }
 
-    vlc_value_t pos;
+    vlc_value_t pos; pos.f_float = 0.0;
     var_Get( getIntf()->p_sys->p_input, "position", &pos );
     if( pos.f_float == 0.0 )
     {
         return "-:--:--";
     }
 
-    vlc_value_t time;
+    vlc_value_t time; time.i_time = 0L;
     var_Get( getIntf()->p_sys->p_input, "time", &time );
 
     return formatTime( time.i_time / 1000000, bShortFormat );
@@ -107,7 +107,7 @@ const string StreamTime::getAsStringDuration( bool bShortFormat ) const
         return "-:--:--";
     }
 
-    vlc_value_t pos;
+    vlc_value_t pos; pos.f_float = 0.0;
     var_Get( getIntf()->p_sys->p_input, "position", &pos );
     if( pos.f_float == 0.0 )
     {