[vlc-commits] demux:mkv: explicitly turn chapter timestamps into mtime_t values

Steve Lhomme git at videolan.org
Fri Feb 23 10:51:20 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Feb 23 09:30:17 2018 +0100| [1737a0a1e86a5d76c72698344e91dfc098210ad7] | committer: Steve Lhomme

demux:mkv: explicitly turn chapter timestamps into mtime_t values

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

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

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 430d86bb2b..6933c08cf3 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1169,12 +1169,12 @@ void matroska_segment_c::ParseChapterAtom( int i_level, KaxChapterAtom *ca, chap
         }
         E_CASE( KaxChapterTimeStart, start )
         {
-            vars.chapters.i_start_time = static_cast<uint64>( start ) / INT64_C(1000);
+            vars.chapters.i_start_time = static_cast<uint64>( start ) / (INT64_C(1000000000) / CLOCK_FREQ);
             debug( vars, "ChapterTimeStart=%" PRId64, vars.chapters.i_start_time );
         }
         E_CASE( KaxChapterTimeEnd, end )
         {
-            vars.chapters.i_end_time = static_cast<uint64>( end ) / INT64_C(1000);
+            vars.chapters.i_end_time = static_cast<uint64>( end ) / (INT64_C(1000000000) / CLOCK_FREQ);
             debug( vars, "ChapterTimeEnd=%" PRId64, vars.chapters.i_end_time );
         }
         E_CASE( KaxChapterDisplay, chapter_display )



More information about the vlc-commits mailing list