diff --git a/ChangeLog b/ChangeLog index fe27816f1..4f6f2ab2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-11-09 Moritz Bunkus + + * mkvmerge: Added support for --sync for VobSub tracks. + + * mkvtoolnix: Re-worked the configure script. Removed all the lib + specific --with-...-include and --with-...-lib options. The + --with-extra-includes and --with-extra-libs options can be used + instead. + 2003-11-08 Moritz Bunkus * mmg: When a file is being added then some information from it diff --git a/src/output/p_vobsub.cpp b/src/output/p_vobsub.cpp index 817b78c41..4fa931324 100644 --- a/src/output/p_vobsub.cpp +++ b/src/output/p_vobsub.cpp @@ -72,8 +72,10 @@ void vobsub_packetizer_c::set_headers() { track_entry->EnableLacing(false); } -#define TIMECODE timecode / 60 / 60 / 1000, (timecode / 60 / 1000) % 60, \ - (timecode / 1000) % 60, timecode % 1000 +#define TIMECODE (timecode - ti->async.displacement) / 60 / 60 / 1000, \ + ((timecode - ti->async.displacement) / 60 / 1000) % 60, \ + ((timecode - ti->async.displacement) / 1000) % 60, \ + (timecode - ti->async.displacement) % 1000 #define FMT_TIMECODE "%02lld:%02lld:%02lld.%03lld" int vobsub_packetizer_c::extract_duration(unsigned char *data, int buf_size, @@ -133,6 +135,7 @@ int vobsub_packetizer_c::deliver_packet(unsigned char *buf, int size, FMT_TIMECODE ").\n", TIMECODE); duration = default_duration; } + timecode = (int64_t)((float)timecode * ti->async.linear); add_packet(buf, size, timecode, duration, true); safefree(buf); @@ -153,6 +156,10 @@ int vobsub_packetizer_c::process(unsigned char *srcbuf, int size, packet_num++; + timecode += ti->async.displacement; + if (timecode < 0) + return EMOREDATA; + if (extract_from_mpeg) { mm_mem_io_c in(srcbuf, size); @@ -302,6 +309,7 @@ int vobsub_packetizer_c::process(unsigned char *srcbuf, int size, } spu_size += size; + timecode = (int64_t)((float)timecode * ti->async.linear); add_packet(srcbuf, size, timecode, duration, true); return EMOREDATA;