summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authormosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-05-09 14:21:05 +0000
committermosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-05-09 14:21:05 +0000
commit03b3f89ef76c506f013849d8a6326946e5416bf9 (patch)
tree21495e7827899fa7b2325b5aa20dac8e4caa684c /libmpdemux
parentb919d578dfe36e2cddb069f3ad4a944a5009a042 (diff)
downloadmpv-03b3f89ef76c506f013849d8a6326946e5416bf9.tar.bz2
mpv-03b3f89ef76c506f013849d8a6326946e5416bf9.tar.xz
timecode scale value must be initialized before the duration is found. API change of libmatroska 0.4.2. Will not work with 0.4.1!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10085 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_mkv.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmpdemux/demux_mkv.cpp b/libmpdemux/demux_mkv.cpp
index 3e8a34db79..2d92a0e8de 100644
--- a/libmpdemux/demux_mkv.cpp
+++ b/libmpdemux/demux_mkv.cpp
@@ -964,6 +964,8 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) {
// General info about this Matroska file
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] |+ segment information...\n");
+ mkv_d->tc_scale = MKVD_TIMECODESCALE;
+
l2 = es->FindNextElement(l1->Generic().Context, upper_lvl_el,
0xFFFFFFFFL, true, 1);
while (l2 != NULL) {
@@ -995,9 +997,6 @@ 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.
@@ -1665,8 +1664,8 @@ extern "C" int demux_mkv_fill_buffer(demuxer_t *d) {
if (EbmlId(*l3) == KaxBlock::ClassInfos.GlobalId) {
block = static_cast<KaxBlock *>(l3);
- block->SetParent(*mkv_d->cluster);
block->ReadData(es->I_O());
+ block->SetParent(*mkv_d->cluster);
delete_element = 0;
elements_found |= 1;