vlc | branch: master | Filip Roséen <[email protected]> | Sat May 21 02:18:02 2016 +0200| [b22189426a232fb4a63d5c356799cc563c1fba1c] | committer: Jean-Baptiste Kempf
mkv: implemented (and enabled) matroska_segment_c::FastSeek The logic for precise and inprecise seeking is the same with the addition that precise seeking should use the exact desired timestamp to use with ES_OUT_SET_NEXT_DISPLAY_TIME, whereas inprecise seeking will use the timestamp associated with the closest index frame. Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b22189426a232fb4a63d5c356799cc563c1fba1c --- modules/demux/mkv/matroska_segment.cpp | 6 +++--- modules/demux/mkv/virtual_segment.cpp | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp index abe03fe..4f57957 100644 --- a/modules/demux/mkv/matroska_segment.cpp +++ b/modules/demux/mkv/matroska_segment.cpp @@ -795,10 +795,10 @@ bool matroska_segment_c::LoadSeekHeadItem( const EbmlCallbacks & ClassInfos, int void matroska_segment_c::FastSeek( mtime_t i_mk_date, mtime_t i_mk_time_offset ) { - VLC_UNUSED( i_mk_date ); - VLC_UNUSED( i_mk_time_offset ); + Seek( i_mk_date, i_mk_time_offset ); - msg_Err( &sys.demuxer, "%s is not implemented in this patch", __func__ ); + sys.i_start_pts = sys.i_pts; + es_out_Control( sys.demuxer.out, ES_OUT_SET_NEXT_DISPLAY_TIME, sys.i_start_pts ); } void matroska_segment_c::Seek( mtime_t i_absolute_mk_date, mtime_t i_mk_time_offset ) diff --git a/modules/demux/mkv/virtual_segment.cpp b/modules/demux/mkv/virtual_segment.cpp index f7a5304..5d30d7e 100644 --- a/modules/demux/mkv/virtual_segment.cpp +++ b/modules/demux/mkv/virtual_segment.cpp @@ -541,13 +541,8 @@ void virtual_segment_c::Seek( demux_t & demuxer, mtime_t i_mk_date, seek_callback_t pf_seek = &matroska_segment_c::Seek; -#if 0 - /* disabled due to non-existing implementation */ if( ! b_precise ) pf_seek = &matroska_segment_c::FastSeek; -#else - VLC_UNUSED( b_precise ); -#endif p_current_vchapter = p_vchapter; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
