Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
3f2542bc
Commit
3f2542bc
authored
Feb 27, 2015
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Feb 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: make sure the position we keep for reference is the one we read
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
988d3773
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
14 deletions
+36
-14
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+36
-14
No files found.
modules/demux/mkv/matroska_segment.cpp
View file @
3f2542bc
...
...
@@ -673,7 +673,7 @@ bool matroska_segment_c::Preload( )
msg_Dbg
(
&
sys
.
demuxer
,
"| + Seek head"
);
if
(
i_seekhead_count
<
10
)
{
i_seekhead_position
=
(
int64_t
)
es
.
I_O
().
getFilePointer
();
i_seekhead_position
=
el
->
GetElementPosition
();
ParseSeekHead
(
static_cast
<
KaxSeekHead
*>
(
el
)
);
}
}
...
...
@@ -681,29 +681,35 @@ bool matroska_segment_c::Preload( )
{
/* Multiple allowed, mandatory */
msg_Dbg
(
&
sys
.
demuxer
,
"| + Information"
);
if
(
i_info_position
<
0
)
// FIXME
if
(
i_info_position
<
0
)
{
ParseInfo
(
static_cast
<
KaxInfo
*>
(
el
)
);
i_info_position
=
(
int64_t
)
es
.
I_O
().
getFilePointer
();
i_info_position
=
el
->
GetElementPosition
();
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxTracks
)
)
{
/* Multiple allowed */
msg_Dbg
(
&
sys
.
demuxer
,
"| + Tracks"
);
if
(
i_tracks_position
<
0
)
// FIXME
if
(
i_tracks_position
<
0
)
{
ParseTracks
(
static_cast
<
KaxTracks
*>
(
el
)
);
}
if
(
tracks
.
size
()
==
0
)
{
msg_Err
(
&
sys
.
demuxer
,
"No tracks supported"
);
return
false
;
}
i_tracks_position
=
(
int64_t
)
es
.
I_O
().
getFilePointer
();
i_tracks_position
=
el
->
GetElementPosition
();
}
else
if
(
MKV_IS_ID
(
el
,
KaxCues
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Cues"
);
if
(
i_cues_position
<
0
)
{
LoadCues
(
static_cast
<
KaxCues
*>
(
el
)
);
i_cues_position
=
(
int64_t
)
es
.
I_O
().
getFilePointer
();
i_cues_position
=
el
->
GetElementPosition
();
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxCluster
)
)
{
...
...
@@ -722,22 +728,28 @@ bool matroska_segment_c::Preload( )
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Attachments"
);
if
(
i_attachments_position
<
0
)
{
ParseAttachments
(
static_cast
<
KaxAttachments
*>
(
el
)
);
i_attachments_position
=
(
int64_t
)
es
.
I_O
().
getFilePointer
();
i_attachments_position
=
el
->
GetElementPosition
();
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxChapters
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Chapters"
);
if
(
i_chapters_position
<
0
)
{
ParseChapters
(
static_cast
<
KaxChapters
*>
(
el
)
);
i_chapters_position
=
(
int64_t
)
es
.
I_O
().
getFilePointer
();
i_chapters_position
=
el
->
GetElementPosition
();
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxTags
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Tags"
);
if
(
i_tags_position
<
0
)
{
LoadTags
(
static_cast
<
KaxTags
*>
(
el
)
);
i_tags_position
=
(
int64_t
)
es
.
I_O
().
getFilePointer
();
i_tags_position
=
el
->
GetElementPosition
();
}
}
else
if
(
MKV_IS_ID
(
el
,
EbmlVoid
)
)
msg_Dbg
(
&
sys
.
demuxer
,
"| + Void"
);
...
...
@@ -788,9 +800,11 @@ bool matroska_segment_c::LoadSeekHeadItem( const EbmlCallbacks & ClassInfos, int
/* Multiple allowed, mandatory */
msg_Dbg
(
&
sys
.
demuxer
,
"| + Information"
);
if
(
i_info_position
<
0
)
{
ParseInfo
(
static_cast
<
KaxInfo
*>
(
el
)
);
i_info_position
=
i_element_position
;
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxTracks
)
)
// FIXME
{
/* Multiple allowed */
...
...
@@ -810,30 +824,38 @@ bool matroska_segment_c::LoadSeekHeadItem( const EbmlCallbacks & ClassInfos, int
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Cues"
);
if
(
i_cues_position
<
0
)
{
LoadCues
(
static_cast
<
KaxCues
*>
(
el
)
);
i_cues_position
=
i_element_position
;
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxAttachments
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Attachments"
);
if
(
i_attachments_position
<
0
)
{
ParseAttachments
(
static_cast
<
KaxAttachments
*>
(
el
)
);
i_attachments_position
=
i_element_position
;
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxChapters
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Chapters"
);
if
(
i_chapters_position
<
0
)
{
ParseChapters
(
static_cast
<
KaxChapters
*>
(
el
)
);
i_chapters_position
=
i_element_position
;
}
}
else
if
(
MKV_IS_ID
(
el
,
KaxTags
)
)
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + Tags"
);
if
(
i_tags_position
<
0
)
{
LoadTags
(
static_cast
<
KaxTags
*>
(
el
)
);
i_tags_position
=
i_element_position
;
}
}
else
{
msg_Dbg
(
&
sys
.
demuxer
,
"| + LoadSeekHeadItem Unknown (%s)"
,
typeid
(
*
el
).
name
()
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment