From 06fa821050f066acb7facfe69a12b40472b225aa Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 15 Jan 2009 22:59:17 +0100 Subject: [PATCH] Fix timecodes in appended subtitle files If subtitle files are appended to separate video files (e.g. two AVI and two SRT files) then the subtitle timecodes of the second and all following subtitle files were based on the last timecode in the first subtitle file instead of the last timecode in the first video file. Fix for bug 325. This bug was introduced in c68a6dfc272c6f62fe5f0ba162f03a17c49c6085 --- ChangeLog | 6 ++++++ src/merge/output_control.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6073fb934..5e66845e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-01-15 Moritz Bunkus + * mkvmerge: bug fix: If subtitle files are appended to separate + video files (e.g. two AVI and two SRT files) then the subtitle + timecodes of the second and all following subtitle files were + based on the last timecode in the first subtitle file instead of + the last timecode in the first video file. Fix for bug 325. + * mkvmerge: bug fix: Due to uninitialized variables mkvmerge would report OGM files as having arbitrary display dimensions. Fix for bug 326. diff --git a/src/merge/output_control.cpp b/src/merge/output_control.cpp index 75493c808..7b622fd9a 100644 --- a/src/merge/output_control.cpp +++ b/src/merge/output_control.cpp @@ -1597,7 +1597,7 @@ append_track(packetizer_t &ptzr, // But then again I don't expect that people will try to concatenate such // files if they've been split before. int64_t timecode_adjustment = dst_file.reader->max_timecode_seen; - if (APPEND_MODE_FILE_BASED == g_append_mode) + if ((track_subtitle != ptzr.packetizer->get_track_type()) && (APPEND_MODE_FILE_BASED == g_append_mode)) // Intentionally left empty. ;