diff options
author | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-30 20:20:51 +0000 |
---|---|---|
committer | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-30 20:20:51 +0000 |
commit | 65f8b757fbeacadb1653d75bd1e699540eb696e4 (patch) | |
tree | c72a4d84514c48e0e5f1806bcd3ec94ed9ef10b1 /libmpdemux | |
parent | c8d20f39ee4fd79e8083953e8e90a19a88d05cd3 (diff) |
Implemented some default values. The corresponding Kax elements are not stored if they are set to their default value.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10037 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_mkv.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libmpdemux/demux_mkv.cpp b/libmpdemux/demux_mkv.cpp index 13df59cf77..6b536712bc 100644 --- a/libmpdemux/demux_mkv.cpp +++ b/libmpdemux/demux_mkv.cpp @@ -277,6 +277,11 @@ static mkv_track_t *new_mkv_track(mkv_demuxer_t *d) { 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 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) { 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 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) { 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; |