[vlc-commits] demux: mkv: ensure timescale is always valid

Francois Cartegnie git at videolan.org
Thu Mar 13 23:59:48 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Mar 13 23:47:27 2014 +0100| [1bfc365c5b65660a7bc4bbb60654d068285f8558] | committer: Francois Cartegnie

demux: mkv: ensure timescale is always valid

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1bfc365c5b65660a7bc4bbb60654d068285f8558
---

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

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 4e3ac8f..41fa0f3 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -341,6 +341,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
             KaxTrackTimecodeScale &ttcs = *(KaxTrackTimecodeScale*)l;
 
             tk->f_timecodescale = float( ttcs );
+            if ( tk->f_timecodescale <= 0 ) tk->f_timecodescale = 1.0;
             msg_Dbg( &sys.demuxer, "|   |   |   + Track TimeCodeScale=%f", tk->f_timecodescale );
         }
         else  if( MKV_IS_ID( l, KaxMaxBlockAdditionID ) ) // UNUSED



More information about the vlc-commits mailing list