changeset 10084:04dacb55d55d

timecode scale value must be initialized before the duration is found. API change of libmatroska 0.4.2. Will not work with 0.4.1!
author mosu
date Fri, 09 May 2003 14:21:05 +0000
parents 6d46331e2d57
children f3bc060a1731
files libmpdemux/demux_mkv.cpp
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.cpp	Thu May 08 14:59:47 2003 +0000
+++ b/libmpdemux/demux_mkv.cpp	Fri May 09 14:21:05 2003 +0000
@@ -964,6 +964,8 @@
         // General info about this Matroska file
         mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] |+ segment information...\n");
         
+        mkv_d->tc_scale = MKVD_TIMECODESCALE;
+
         l2 = es->FindNextElement(l1->Generic().Context, upper_lvl_el,
                                  0xFFFFFFFFL, true, 1);
         while (l2 != NULL) {
@@ -995,9 +997,6 @@
                                    0xFFFFFFFFL, true, 1);
         }
 
-        if (mkv_d->tc_scale == 0)
-          mkv_d->tc_scale = MKVD_TIMECODESCALE;
-
       } else if (EbmlId(*l1) == KaxTracks::ClassInfos.GlobalId) {
         // Yep, we've found our KaxTracks element. Now find all tracks
         // contained in this segment.
@@ -1665,8 +1664,8 @@
 
               if (EbmlId(*l3) == KaxBlock::ClassInfos.GlobalId) {
                 block = static_cast<KaxBlock *>(l3);
+                block->ReadData(es->I_O());
                 block->SetParent(*mkv_d->cluster);
-                block->ReadData(es->I_O());
                 delete_element = 0;
                 elements_found |= 1;