vlc | branch: master | Steve Lhomme <[email protected]> | Mon Mar 7 13:53:27 2016 +0100| [98448d30b3ec0f08f81991bcaaada41a9efbe4a4] | committer: Jean-Baptiste Kempf
mkv: revert 8317c24270d45b4938acaf58104e18f5039eade0 This reverts commit 8317c24270d45b4938acaf58104e18f5039eade0. it introduced issues with CPU intensive files dropping a lot of frames Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98448d30b3ec0f08f81991bcaaada41a9efbe4a4 --- modules/demux/mkv/mkv.cpp | 12 ++++++++++++ modules/demux/mkv/util.cpp | 29 ----------------------------- 2 files changed, 12 insertions(+), 29 deletions(-) diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp index fa8c59a..35b52c7 100644 --- a/modules/demux/mkv/mkv.cpp +++ b/modules/demux/mkv/mkv.cpp @@ -766,6 +766,18 @@ static int Demux( demux_t *p_demux) p_sys->i_pts = (mtime_t)block->GlobalTimecode() / INT64_C(1000); p_sys->i_pts += p_sys->i_mk_chapter_time + VLC_TS_0; + mtime_t i_pcr = VLC_TS_INVALID; + for( size_t i = 0; i < p_segment->tracks.size(); i++) + if( p_segment->tracks[i]->i_last_dts > VLC_TS_INVALID && + ( p_segment->tracks[i]->i_last_dts < i_pcr || i_pcr == VLC_TS_INVALID )) + i_pcr = p_segment->tracks[i]->i_last_dts; + + if( i_pcr > p_sys->i_pcr + 300000 ) + { + es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pcr ); + p_sys->i_pcr = i_pcr; + } + if( p_sys->i_pts >= p_sys->i_start_pts ) { if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) ) diff --git a/modules/demux/mkv/util.cpp b/modules/demux/mkv/util.cpp index bd3398c..8155537 100644 --- a/modules/demux/mkv/util.cpp +++ b/modules/demux/mkv/util.cpp @@ -270,35 +270,6 @@ 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 ); } - // find the latest DTS for an active track - mtime_t i_ts_max = INT64_MIN; - for( size_t j = 0; j < p_segment->tracks.size(); j++ ) - { - mkv_track_t *tk = p_segment->tracks[j]; - if( tk->i_last_dts > VLC_TS_INVALID ) - i_ts_max = __MAX( i_ts_max, tk->i_last_dts ); - } - - // find the earliest DTS less than 10 clock ticks away from the latest DTS - mtime_t i_ts_min = INT64_MAX; - for( size_t j = 0; j < p_segment->tracks.size(); j++ ) - { - mkv_track_t *tk = p_segment->tracks[j]; - if( tk->i_last_dts > VLC_TS_INVALID && tk->i_last_dts + 10 * CLOCK_FREQ >= i_ts_max ) - i_ts_min = __MIN( i_ts_min, tk->i_last_dts ); - } - - // the PCR is the earliest active DTS if we found one - if( i_ts_min != INT64_MAX && ( i_ts_min > p_sys->i_pcr || p_sys->i_pcr == VLC_TS_INVALID ) ) - { - p_sys->i_pcr = i_ts_min; - es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_ts_min ); - } - -#if 0 -msg_Dbg( p_demux, "block (track=%d) i_dts: %" PRId64" / i_pts: %" PRId64, p_tk->i_number, p_block->i_dts, p_block->i_pts); -#endif - es_out_Send( p_demux->out, p_tk->p_es, p_block); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
