mirror of https://github.com/mpv-player/mpv
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
This commit is contained in:
parent
c8d20f39ee
commit
65f8b757fb
|
@ -277,6 +277,11 @@ static mkv_track_t *new_mkv_track(mkv_demuxer_t *d) {
|
||||||
return NULL;
|
return NULL;
|
||||||
d->tracks[d->num_tracks] = t;
|
d->tracks[d->num_tracks] = t;
|
||||||
d->num_tracks++;
|
d->num_tracks++;
|
||||||
|
|
||||||
|
// Set default values.
|
||||||
|
t->default_track = 1;
|
||||||
|
t->a_sfreq = 8000.0;
|
||||||
|
t->a_channels = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
|
@ -962,6 +967,9 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) {
|
||||||
0xFFFFFFFFL, true, 1);
|
0xFFFFFFFFL, true, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mkv_d->tc_scale == 0)
|
||||||
|
mkv_d->tc_scale = MKVD_TIMECODESCALE;
|
||||||
|
|
||||||
} else if (EbmlId(*l1) == KaxTracks::ClassInfos.GlobalId) {
|
} else if (EbmlId(*l1) == KaxTracks::ClassInfos.GlobalId) {
|
||||||
// Yep, we've found our KaxTracks element. Now find all tracks
|
// Yep, we've found our KaxTracks element. Now find all tracks
|
||||||
// contained in this segment.
|
// contained in this segment.
|
||||||
|
@ -1340,9 +1348,6 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mkv_d->tc_scale == 0)
|
|
||||||
mkv_d->tc_scale = MKVD_TIMECODESCALE;
|
|
||||||
|
|
||||||
if (!check_track_information(mkv_d)) {
|
if (!check_track_information(mkv_d)) {
|
||||||
free_mkv_demuxer(mkv_d);
|
free_mkv_demuxer(mkv_d);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue