If a subtitle packet was the last packet in a cluster then its duration was not written resulting in a broken file.

This commit is contained in:
Moritz Bunkus 2003-08-22 19:49:37 +00:00
parent b517a8376f
commit a1ea341dd4
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-08-22 Moritz Bunkus <moritz@bunkus.org>
* 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 <moritz@bunkus.org> 2003-08-21 Moritz Bunkus <moritz@bunkus.org>
* mkvinfo: Added support for the following elements: * mkvinfo: Added support for the following elements:

View File

@ -477,6 +477,9 @@ int cluster_helper_c::render() {
last_source = source; last_source = source;
} }
for (k = 0, block_duration = 0; k < durations.size(); k++)
block_duration += durations[k];
if (elements_in_cluster > 0) { if (elements_in_cluster > 0) {
def_duration = last_source->get_track_default_duration_ns() / 1000000; def_duration = last_source->get_track_default_duration_ns() / 1000000;
if ((block_duration != 0) && (def_duration != block_duration)) { if ((block_duration != 0) && (def_duration != block_duration)) {