[Mplayer-cvslog] CVS: main/libmpdemux demux_mkv.cpp,1.3,1.4

Moritz Bunkus CVS mosu at mplayerhq.hu
Wed Apr 30 22:21:17 CEST 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv5916

Modified Files:
	demux_mkv.cpp 
Log Message:
Implemented some default values. The corresponding Kax elements are not stored if they are set to their default value.

Index: demux_mkv.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- demux_mkv.cpp	30 Apr 2003 19:35:28 -0000	1.3
+++ demux_mkv.cpp	30 Apr 2003 20:20:51 -0000	1.4
@@ -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.
@@ -1339,9 +1347,6 @@
     mp_msg(MSGT_DEMUX, MSGL_ERR, "[mkv] caught exception\n");
     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);



More information about the MPlayer-cvslog mailing list