]> git.sesse.net Git - vlc/commitdiff
Workaround warning on function returned value casted.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 24 Aug 2009 20:25:20 +0000 (22:25 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 24 Aug 2009 20:43:07 +0000 (22:43 +0200)
modules/demux/nuv.c

index 99cad8397b69466a98a7938d6183bfb6f7902576..85011cdf64c6bb7506a4bfa84d367388eedcee68 100644 (file)
@@ -461,9 +461,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 i64 = stream_Size( p_demux->s );
                 if( i64 > 0 )
-                    *pf = (double)stream_Tell( p_demux->s ) / (double)i64;
+                {
+                    const double f_current = stream_Tell( p_demux->s );
+                    *pf = f_current / (double)i64;
+                }
                 else
+                {
                     *pf = 0.0;
+                }
             }
             return VLC_SUCCESS;