[vlc-devel] [PATCH 11/14] mkv: removed unnecessary variable and cleaned up expression

Filip Roséen filip at videolabs.io
Wed Mar 9 12:50:06 CET 2016


---
 modules/demux/mkv/matroska_segment_parse.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index e7631e6..44202fb 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -862,8 +862,7 @@ void matroska_segment_c::ParseInfo( KaxInfo *info )
 
     InfoHandlers::Dispatcher().iterate( m->begin(), m->end(), InfoHandlers::Payload( captures ) );
 
-    double f_dur = double(i_duration) * double(i_timescale) / 1000000.0;
-    i_duration = mtime_t(f_dur);
+    i_duration = mtime_t( static_cast<double>( i_duration * i_timescale ) / 10e5 );
     if( !i_duration ) i_duration = -1;
 }
 
-- 
2.7.2



More information about the vlc-devel mailing list