# HG changeset patch # User mosu # Date 1051734051 0 # Node ID 1dfe4dab4a42edb6e404c56ff2e1aadcce22b693 # Parent d4ecf93e236acf4946c5b66111abc9ea229169ac Implemented some default values. The corresponding Kax elements are not stored if they are set to their default value. diff -r d4ecf93e236a -r 1dfe4dab4a42 libmpdemux/demux_mkv.cpp --- 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;