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
89c26f35
Commit
89c26f35
authored
Sep 08, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: add check for reversed moov/mdat order with non seekable files
parent
27e7fb5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+18
-2
No files found.
modules/demux/mp4/libmp4.c
View file @
89c26f35
...
...
@@ -4185,13 +4185,29 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *p_stream )
CreateUUID
(
&
p_root
->
i_uuid
,
p_root
->
i_type
);
/* First get the moov */
const
uint32_t
stoplist
[]
=
{
ATOM_moov
,
0
};
const
uint32_t
stoplist
[]
=
{
ATOM_moov
,
ATOM_mdat
,
0
};
i_result
=
MP4_ReadBoxContainerChildren
(
p_stream
,
p_root
,
stoplist
);
/* mdat appeared first */
if
(
i_result
&&
!
MP4_BoxGet
(
p_root
,
"moov"
)
)
{
bool
b_seekable
;
if
(
stream_Control
(
p_stream
,
STREAM_CAN_SEEK
,
&
b_seekable
)
!=
VLC_SUCCESS
||
!
b_seekable
)
{
msg_Err
(
p_stream
,
"no moov before mdat and the stream is not seekable"
);
goto
error
;
}
/* continue loading up to moov */
const
uint32_t
stoplist
[]
=
{
ATOM_moov
,
0
};
i_result
=
MP4_ReadBoxContainerChildren
(
p_stream
,
p_root
,
stoplist
);
}
if
(
!
i_result
)
goto
error
;
/* If there is a mvex box, it means fragmented MP4, and we're done */
else
if
(
MP4_BoxCount
(
p_root
,
"moov/mvex"
)
>
0
)
if
(
MP4_BoxCount
(
p_root
,
"moov/mvex"
)
>
0
)
return
p_root
;
if
(
stream_Tell
(
p_stream
)
+
8
<
(
uint64_t
)
stream_Size
(
p_stream
)
)
...
...
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