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
fa5dc0c5
Commit
fa5dc0c5
authored
Oct 15, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: libmp4: add support for index prefixed atom list
parent
2cc05f7d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+19
-3
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+1
-0
No files found.
modules/demux/mp4/libmp4.c
View file @
fa5dc0c5
...
@@ -191,15 +191,15 @@ static int MP4_NextBox( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -191,15 +191,15 @@ static int MP4_NextBox( stream_t *p_stream, MP4_Box_t *p_box )
* after called one of theses functions, file position is unknown
* after called one of theses functions, file position is unknown
* you need to call MP4_GotoBox to go where you want
* you need to call MP4_GotoBox to go where you want
*****************************************************************************/
*****************************************************************************/
int
MP4_ReadBoxContainerChildren
(
stream_t
*
p_stream
,
static
int
MP4_ReadBoxContainerChildrenIndexed
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_container
,
uint32_t
i_last_chil
d
)
MP4_Box_t
*
p_container
,
uint32_t
i_last_child
,
bool
b_indexe
d
)
{
{
MP4_Box_t
*
p_box
;
MP4_Box_t
*
p_box
;
/* Size of root container is set to 0 when unknown, for exemple
/* Size of root container is set to 0 when unknown, for exemple
* with a DASH stream. In that case, we skip the following check */
* with a DASH stream. In that case, we skip the following check */
if
(
p_container
->
i_size
if
(
p_container
->
i_size
&&
(
stream_Tell
(
p_stream
)
+
8
>
&&
(
stream_Tell
(
p_stream
)
+
((
b_indexed
)
?
16
:
8
)
>
(
off_t
)(
p_container
->
i_pos
+
p_container
->
i_size
)
)
(
off_t
)(
p_container
->
i_pos
+
p_container
->
i_size
)
)
)
)
{
{
...
@@ -209,7 +209,16 @@ int MP4_ReadBoxContainerChildren( stream_t *p_stream,
...
@@ -209,7 +209,16 @@ int MP4_ReadBoxContainerChildren( stream_t *p_stream,
do
do
{
{
uint32_t
i_index
=
0
;
if
(
b_indexed
)
{
uint8_t
read
[
8
];
if
(
stream_Read
(
p_stream
,
read
,
8
)
<
8
)
return
0
;
i_index
=
GetDWBE
(
&
read
[
4
]);
}
if
(
(
p_box
=
MP4_ReadBox
(
p_stream
,
p_container
)
)
==
NULL
)
break
;
if
(
(
p_box
=
MP4_ReadBox
(
p_stream
,
p_container
)
)
==
NULL
)
break
;
p_box
->
i_index
=
i_index
;
/* chain this box with the father and the other at same level */
/* chain this box with the father and the other at same level */
if
(
!
p_container
->
p_first
)
p_container
->
p_first
=
p_box
;
if
(
!
p_container
->
p_first
)
p_container
->
p_first
=
p_box
;
...
@@ -227,6 +236,13 @@ int MP4_ReadBoxContainerChildren( stream_t *p_stream,
...
@@ -227,6 +236,13 @@ int MP4_ReadBoxContainerChildren( stream_t *p_stream,
return
1
;
return
1
;
}
}
int
MP4_ReadBoxContainerChildren
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_container
,
uint32_t
i_last_child
)
{
return
MP4_ReadBoxContainerChildrenIndexed
(
p_stream
,
p_container
,
i_last_child
,
false
);
}
static
int
MP4_ReadBoxContainerRaw
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_container
)
static
int
MP4_ReadBoxContainerRaw
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_container
)
{
{
return
MP4_ReadBoxContainerChildren
(
p_stream
,
p_container
,
0
);
return
MP4_ReadBoxContainerChildren
(
p_stream
,
p_container
,
0
);
...
...
modules/demux/mp4/libmp4.h
View file @
fa5dc0c5
...
@@ -1446,6 +1446,7 @@ struct MP4_Box_s
...
@@ -1446,6 +1446,7 @@ struct MP4_Box_s
uint32_t
i_type
;
uint32_t
i_type
;
uint32_t
i_shortsize
;
uint32_t
i_shortsize
;
uint32_t
i_handler
;
/**/
uint32_t
i_handler
;
/**/
uint32_t
i_index
;
/* indexed list (ilst) */
enum
enum
{
{
...
...
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