[matroska] r1097 - trunk/DvdMenuXtractor

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: robux4
Date: 2005-03-17 12:34:39 +0300 (Thu, 17 Mar 2005)
New Revision: 1097

Modified:
   trunk/DvdMenuXtractor/VobParser.cpp
Log:
DMX: could fix the video gap problem (to be tested)

Modified: trunk/DvdMenuXtractor/VobParser.cpp
===================================================================
--- trunk/DvdMenuXtractor/VobParser.cpp	2005-03-17 09:14:52 UTC (rev 1096)
+++ trunk/DvdMenuXtractor/VobParser.cpp	2005-03-17 09:34:39 UTC (rev 1097)
@@ -921,6 +921,17 @@
 
 void VideoDemuxWriter::WriteTimecodeInfo(uint32_t start_time, uint32_t end_time, uint64_t filepos, const wxString & debug)
 {
+	m_TimecodeFile = GetTimecodeFile();
+	if (start_time > m_last_end_timecode)
+	{
+		if (m_last_end_timecode > m_start_timecode)
+			fprintf(m_TimecodeFile, "%lf\n", (m_last_end_timecode - m_start_timecode) / 1000.0);
+		fprintf(m_TimecodeFile, "%lf\n", (m_last_end_timecode - m_last_start_timecode) / 1000.0);
+		fprintf(m_TimecodeFile, "gap,%lf\n", (start_time - m_last_end_timecode) / 1000.0);
+		m_start_timecode = start_time;
+	}
+	m_last_start_timecode = start_time;
+	m_last_end_timecode = end_time;
 }
 
 // ============================================================================
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.