From fcb2005d93235d3340072c1c7e7b10ae2a6e2233 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 26 Jul 2004 18:38:56 +0000 Subject: [PATCH] Write a block duration of 0s in cases where it's appropriate, e.g. for subtitle entries. --- ChangeLog | 3 +++ src/cluster_helper.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7a65b51c4..09d5bfab6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-07-26 Moritz Bunkus + * 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. diff --git a/src/cluster_helper.cpp b/src/cluster_helper.cpp index 42cf54eaa..06d4aa159 100644 --- a/src/cluster_helper.cpp +++ b/src/cluster_helper.cpp @@ -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); }