From a1ea341dd481d55986f0f199bab29294a890db1c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 22 Aug 2003 19:49:37 +0000 Subject: [PATCH] If a subtitle packet was the last packet in a cluster then its duration was not written resulting in a broken file. --- ChangeLog | 5 +++++ src/cluster_helper.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 41f7a34e4..8c06ab436 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-08-22 Moritz Bunkus + + * mkvmerge: Bugfix: If a subtitle packet was the last packet in a + cluster then its duration was not written resulting in a broken file. + 2003-08-21 Moritz Bunkus * mkvinfo: Added support for the following elements: diff --git a/src/cluster_helper.cpp b/src/cluster_helper.cpp index e0be4fd44..e62a8eae3 100644 --- a/src/cluster_helper.cpp +++ b/src/cluster_helper.cpp @@ -477,6 +477,9 @@ int cluster_helper_c::render() { last_source = source; } + for (k = 0, block_duration = 0; k < durations.size(); k++) + block_duration += durations[k]; + if (elements_in_cluster > 0) { def_duration = last_source->get_track_default_duration_ns() / 1000000; if ((block_duration != 0) && (def_duration != block_duration)) {