MPEG TS: don't interpret forward gaps in subtitle tracks as timecodes wrapping

This commit is contained in:
Moritz Bunkus 2014-09-25 20:05:14 +02:00
parent e134437b11
commit 6f614bd212
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2014-09-25 Moritz Bunkus <moritz@bunkus.org>
* 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 <moritz@bunkus.org>
* MKVToolNix GUI: implemented drag & drop in the track pane.

View File

@ -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{};
}