From 6f614bd212baf1337625f552a413f95392d481e0 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 25 Sep 2014 20:05:14 +0200 Subject: [PATCH] MPEG TS: don't interpret forward gaps in subtitle tracks as timecodes wrapping --- ChangeLog | 8 ++++++++ src/input/r_mpeg_ts.cpp | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 657e7a8b5..85104c0ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-09-25 Moritz Bunkus + + * mkvmerge: bug fix: Reading tracks from MPEG transport streams + resulted in the track being cut off at points with a five minute + gap in between frames. It is due to timecode wrap detection + introduced in v6.9.0. As it affects subtitles the most the wrap + detection has been relaxed for them. + 2014-09-20 Moritz Bunkus * MKVToolNix GUI: implemented drag & drop in the track pane. diff --git a/src/input/r_mpeg_ts.cpp b/src/input/r_mpeg_ts.cpp index 1748c58cf..6907b0804 100644 --- a/src/input/r_mpeg_ts.cpp +++ b/src/input/r_mpeg_ts.cpp @@ -351,7 +351,11 @@ mpeg_ts_track_c::adjust_timecode_for_wrap(timecode_c &timecode) { if (timecode < s_wrap_limit) timecode += m_timecode_wrap_add; - if ((timecode - m_previous_valid_timecode).abs() >= s_bad_limit) + // For subtitle tracks only detect jumps backwards in time, not + // forward. Subtitles often have holes larger than five minutes + // between the entries. + if ( ((timecode < m_previous_valid_timecode) || (ES_SUBT_TYPE != type)) + && ((timecode - m_previous_valid_timecode).abs() >= s_bad_limit)) timecode = timecode_c{}; }