Write a block duration of 0s in cases where it's appropriate, e.g. for subtitle entries.

This commit is contained in:
Moritz Bunkus 2004-07-26 18:38:56 +00:00
parent eb8e212b7a
commit fcb2005d93
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2004-07-26 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: Block durations with 0s length (e.g. entries
in a SSA file) were not written.
* mkvmerge: bug fix: The FLAC packetizer gets the duration
from the FLAC packet itself.

View File

@ -337,8 +337,12 @@ cluster_helper_c::set_duration(render_groups_t *rg) {
block_duration, RND_TIMECODE_SCALE(def_duration),
use_durations ? 1 : 0, rg->duration_mandatory ? 1 : 0);
if ((block_duration > 0) && (block_duration != def_duration) &&
(use_durations || rg->duration_mandatory))
if (rg->duration_mandatory) {
if ((block_duration == 0) ||
((block_duration > 0) && (block_duration != def_duration)))
group->SetBlockDuration(block_duration);
} else if (use_durations && (block_duration > 0) &&
(block_duration != def_duration))
group->SetBlockDuration(block_duration);
}