[vlc-commits] Call SET_NEXT_DISPLAY_TIME after SET_PCR to avoid its flush at segment change .
Denis Charmet
git at videolan.org
Thu Dec 13 00:52:09 CET 2012
vlc | branch: master | Denis Charmet <typx at dinauz.org> | Wed Dec 12 23:24:11 2012 +0100| [d12e755e4b27faacee453556b59a8725e76bfb49] | committer: Jean-Baptiste Kempf
Call SET_NEXT_DISPLAY_TIME after SET_PCR to avoid its flush at segment change.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d12e755e4b27faacee453556b59a8725e76bfb49
---
modules/demux/mkv/matroska_segment.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mkv/matroska_segment.cpp b/modules/demux/mkv/matroska_segment.cpp
index c19e1d5..3d334f2 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -833,9 +833,9 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
/* Don't try complex seek if we seek to 0 */
if( i_date == 0 && i_time_offset == 0 )
{
+ es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, VLC_TS_0 );
es_out_Control( sys.demuxer.out, ES_OUT_SET_NEXT_DISPLAY_TIME,
INT64_C(0) );
- es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, VLC_TS_0 );
es.I_O().setFilePointer( i_start_pos );
delete ep;
@@ -873,8 +873,6 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
sys.i_start_pts = i_date;
- es_out_Control( sys.demuxer.out, ES_OUT_SET_NEXT_DISPLAY_TIME, i_date );
-
/* now parse until key frame */
const int es_types[3] = { VIDEO_ES, AUDIO_ES, SPU_ES };
i_cat = es_types[0];
@@ -912,7 +910,11 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
}
/*Neither video nor audio track... no seek further*/
if( unlikely( !p_first ) )
+ {
+ es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, i_date );
+ es_out_Control( sys.demuxer.out, ES_OUT_SET_NEXT_DISPLAY_TIME, i_date );
return;
+ }
for(;;)
{
@@ -981,6 +983,7 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
sys.i_pcr = sys.i_pts = p_min->i_date;
es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, VLC_TS_0 + sys.i_pcr );
+ es_out_Control( sys.demuxer.out, ES_OUT_SET_NEXT_DISPLAY_TIME, i_date );
cluster = (KaxCluster *) ep->UnGet( p_min->i_seek_pos, p_min->i_cluster_pos );
/* hack use BlockGet to get the cluster then goto the wanted block */
More information about the vlc-commits
mailing list