[vlc-commits] demux: mkv: fix initial seek discontinuity flag

Francois Cartegnie git at videolan.org
Fri May 19 10:54:03 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri May 19 10:49:43 2017 +0200| [9a994f8f0f2b9e0eff666bc9a89e34da8afca03a] | committer: Francois Cartegnie

demux: mkv: fix initial seek discontinuity flag

refs #18245

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

 modules/demux/mkv/matroska_segment.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 415f77f489..5bcc3b51a6 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -822,6 +822,8 @@ bool matroska_segment_c::Seek( mtime_t i_absolute_mk_date, mtime_t i_mk_time_off
         mkv_track_t& track = it->second;
 
         track.i_skip_until_fpos = -1;
+        if( track.i_last_dts > VLC_TS_INVALID )
+            track.b_discontinuity = true;
         track.i_last_dts        = VLC_TS_INVALID;
     }
 
@@ -850,7 +852,6 @@ bool matroska_segment_c::Seek( mtime_t i_absolute_mk_date, mtime_t i_mk_time_off
 
         track.i_skip_until_fpos = it->second.fpos;
         track.i_last_dts        = it->second.pts;
-        track.b_discontinuity   = true;
 
         msg_Dbg( &sys.demuxer, "seek: preroll{ track: %u, pts: %" PRId64 ", fpos: %" PRIu64 " } ",
           it->first, it->second.pts, it->second.fpos );



More information about the vlc-commits mailing list