From 3713fd72e43c0fb8b80c8ec45bcd56d999e83b7e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 3 Sep 2008 16:18:50 +0000 Subject: [PATCH] Honor the timecode offsets in MPEG program streams (VOB files). This fixes audio/video desynchronization. Fix for bug 295. --- ChangeLog | 6 ++++++ src/input/r_mpeg.cpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 732441f55..5a8510536 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-03 Moritz Bunkus + + * mkvmerge: bug fix: mkvmerge honors the timecode offsets of all + streams in a MPEG program stream (e.g. VOB file) fixing + audio/video desynchronization. Fix for bug 295. + 2008-08-30 Moritz Bunkus * mkvmerge: Switched from the PCRE regular expression library to diff --git a/src/input/r_mpeg.cpp b/src/input/r_mpeg.cpp index ed95cf735..ef5d772d8 100644 --- a/src/input/r_mpeg.cpp +++ b/src/input/r_mpeg.cpp @@ -1136,6 +1136,9 @@ mpeg_ps_reader_c::create_packetizer(int64_t id) { } else mxerror("mpeg_ps_reader: Should not have happened #2. %s", BUGMSG); } + + if (-1 != track->timecode_offset) + PTZR(track->ptzr)->ti.tcsync.displacement += track->timecode_offset; } void