From a87386b8c866afa8380eb3094f4fb064b471697d Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 21 Aug 2005 20:04:09 +0000 Subject: [PATCH] Fixed --delay. --- ChangeLog | 2 ++ src/merge/pr_generic.cpp | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index efda0436a..5ea855af7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-08-21 Moritz Bunkus + * mkvmerge: bug fix: --delay was not working at all. + * mkvmerge: bug fix: Single digit numbers followed by 's' were not recognized as valid numbers with a unit (e.g. in '--delay 0:9s'). diff --git a/src/merge/pr_generic.cpp b/src/merge/pr_generic.cpp index 9f2789903..8c76d4e62 100644 --- a/src/merge/pr_generic.cpp +++ b/src/merge/pr_generic.cpp @@ -883,11 +883,14 @@ generic_packetizer_c::add_packet(packet_cptr pack) { void generic_packetizer_c::add_packet2(packet_cptr pack) { - pack->timecode += correction_timecode_offset + append_timecode_offset; + pack->timecode += correction_timecode_offset + append_timecode_offset + + ti.packet_delay; if (pack->bref >= 0) - pack->bref += correction_timecode_offset + append_timecode_offset; + pack->bref += correction_timecode_offset + append_timecode_offset + + ti.packet_delay; if (pack->fref >= 0) - pack->fref += correction_timecode_offset + append_timecode_offset; + pack->fref += correction_timecode_offset + append_timecode_offset + + ti.packet_delay; if ((htrack_min_cache < 2) && (pack->fref >= 0)) { set_track_min_cache(2);