changeset 10036:1dfe4dab4a42

Implemented some default values. The corresponding Kax elements are not stored if they are set to their default value.
author mosu
date Wed, 30 Apr 2003 20:20:51 +0000
parents d4ecf93e236a
children 1a26db279e50
files libmpdemux/demux_mkv.cpp
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.cpp	Wed Apr 30 20:17:35 2003 +0000
+++ b/libmpdemux/demux_mkv.cpp	Wed Apr 30 20:20:51 2003 +0000
@@ -277,6 +277,11 @@
       return NULL;
     d->tracks[d->num_tracks] = t;
     d->num_tracks++;
+
+    // Set default values.
+    t->default_track = 1;
+    t->a_sfreq = 8000.0;
+    t->a_channels = 1;
   }
   
   return t;
@@ -962,6 +967,9 @@
                                    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.
@@ -1340,9 +1348,6 @@
     return 0;
   }
 
-  if (mkv_d->tc_scale == 0)
-    mkv_d->tc_scale = MKVD_TIMECODESCALE;
-
   if (!check_track_information(mkv_d)) {
     free_mkv_demuxer(mkv_d);
     return 0;