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)) {