[vlc-commits] demux:mkv: use vlc_tick_t to store chapter start/end timestamps
Steve Lhomme
git at videolan.org
Tue Sep 18 13:52:56 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun 7 16:35:19 2018 +0200| [a1bf9e4da2459c46aa3a02fa1338e283d88c9cb3] | committer: Steve Lhomme
demux:mkv: use vlc_tick_t to store chapter start/end timestamps
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a1bf9e4da2459c46aa3a02fa1338e283d88c9cb3
---
modules/demux/mkv/chapters.hpp | 2 +-
modules/demux/mkv/matroska_segment_parse.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mkv/chapters.hpp b/modules/demux/mkv/chapters.hpp
index de87886321..150edfa0e4 100644
--- a/modules/demux/mkv/chapters.hpp
+++ b/modules/demux/mkv/chapters.hpp
@@ -74,7 +74,7 @@ public:
bool ParentOf( const chapter_item_c & item ) const;
int16 GetTitleNumber( ) const;
- int64_t i_start_time, i_end_time;
+ vlc_tick_t i_start_time, i_end_time;
std::vector<chapter_item_c*> sub_chapters;
KaxChapterSegmentUID *p_segment_uid;
KaxChapterSegmentEditionUID *p_segment_edition_uid;
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 1d2c45d41f..9bb46403eb 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1198,12 +1198,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(1000000000) / CLOCK_FREQ);
+ vars.chapters.i_start_time = VLC_TICK_FROM_NS(static_cast<uint64>( start ));
debug( vars, "ChapterTimeStart=%" PRId64, vars.chapters.i_start_time );
}
E_CASE( KaxChapterTimeEnd, end )
{
- vars.chapters.i_end_time = static_cast<uint64>( end ) / (INT64_C(1000000000) / CLOCK_FREQ);
+ vars.chapters.i_end_time = VLC_TICK_FROM_NS(static_cast<uint64>( end ));
debug( vars, "ChapterTimeEnd=%" PRId64, vars.chapters.i_end_time );
}
E_CASE( KaxChapterDisplay, chapter_display )
More information about the vlc-commits
mailing list