Fixed --delay.

This commit is contained in:
Moritz Bunkus 2005-08-21 20:04:09 +00:00
parent 1aef04e7cb
commit a87386b8c8
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,7 @@
2005-08-21 Moritz Bunkus <moritz@bunkus.org>
* 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').

View File

@ -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);