[matroska] r885 - trunk/JEBML/src/org/ebml/matroska

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: jcsston
Date: 2004-10-14 23:12:32 +0400 (Thu, 14 Oct 2004)
New Revision: 885

Modified:
   trunk/JEBML/src/org/ebml/matroska/MatroskaBlock.java
   trunk/JEBML/src/org/ebml/matroska/MatroskaFile.java
Log:
Sort of a hack for cluster and frame timecodes to be read correctly.
Timecode scale is ignored currently.

Modified: trunk/JEBML/src/org/ebml/matroska/MatroskaBlock.java
===================================================================
--- trunk/JEBML/src/org/ebml/matroska/MatroskaBlock.java	2004-10-14 19:11:41 UTC (rev 884)
+++ trunk/JEBML/src/org/ebml/matroska/MatroskaBlock.java	2004-10-14 19:12:32 UTC (rev 885)
@@ -162,7 +162,7 @@
   }
 
   public long getAdjustedBlockTimecode(long ClusterTimecode, long TimecodeScale) {
-    return ClusterTimecode + (BlockTimecode * TimecodeScale);
+    return ClusterTimecode + (BlockTimecode);// * TimecodeScale);
   }
 
   public int getTrackNo() {

Modified: trunk/JEBML/src/org/ebml/matroska/MatroskaFile.java
===================================================================
--- trunk/JEBML/src/org/ebml/matroska/MatroskaFile.java	2004-10-14 19:11:41 UTC (rev 884)
+++ trunk/JEBML/src/org/ebml/matroska/MatroskaFile.java	2004-10-14 19:12:32 UTC (rev 885)
@@ -276,7 +276,7 @@
 
         MatroskaFileFrame frame = new MatroskaFileFrame();
         frame.TrackNo = block.getTrackNo();
-        frame.Timecode = block.getAdjustedBlockTimecode(ClusterTimecode, this.TimecodeScale) / 1000000;
+        frame.Timecode = block.getAdjustedBlockTimecode(ClusterTimecode, this.TimecodeScale);
         frame.Duration = BlockDuration;
         frame.Reference = BlockReference;
         frame.Data = block.getFrame(0);
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.