[vlc-commits] demux: mkv: flag discontinuity on seek
Francois Cartegnie
git at videolan.org
Tue Apr 4 14:17:29 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 4 12:21:54 2017 +0200| [cc07bb487d48f747ed92ad2dbebe8114b0905535] | committer: Francois Cartegnie
demux: mkv: flag discontinuity on seek
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc07bb487d48f747ed92ad2dbebe8114b0905535
---
modules/demux/mkv/matroska_segment.cpp | 1 +
modules/demux/mkv/matroska_segment_parse.cpp | 1 +
modules/demux/mkv/mkv.hpp | 1 +
modules/demux/mkv/util.cpp | 6 ++++++
4 files changed, 9 insertions(+)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index 9aca1da..c486dd0 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -847,6 +847,7 @@ void 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 );
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index bcf7ff5..f4d7361 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -241,6 +241,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
track.p_sys = NULL;
track.b_inited = false;
+ track.b_discontinuity = false;
track.i_data_init = 0;
track.p_data_init = NULL;
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index 6535814..3c94d14 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -218,6 +218,7 @@ class mkv_track_t
PrivateTrackData *p_sys;
bool b_inited;
+ bool b_discontinuity;
/* data to be send first */
int i_data_init;
uint8_t *p_data_init;
diff --git a/modules/demux/mkv/util.cpp b/modules/demux/mkv/util.cpp
index 1740db6..1a4f157 100644
--- a/modules/demux/mkv/util.cpp
+++ b/modules/demux/mkv/util.cpp
@@ -269,6 +269,12 @@ void send_Block( demux_t * p_demux, mkv_track_t * p_tk, block_t * p_block, unsig
(double) p_segment->i_timescale / ( 1000.0 * i_number_frames );
}
+ if( p_tk->b_discontinuity )
+ {
+ p_block->i_flags |= BLOCK_FLAG_DISCONTINUITY;
+ p_tk->b_discontinuity = false;
+ }
+
es_out_Send( p_demux->out, p_tk->p_es, p_block);
}
More information about the vlc-commits
mailing list