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
27e7fb5d
Commit
27e7fb5d
authored
Sep 08, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: libmp4: rewrite nextbox/container reading
parent
6bff31b4
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
123 additions
and
72 deletions
+123
-72
modules/demux/dash/mp4/AtomsReader.cpp
modules/demux/dash/mp4/AtomsReader.cpp
+1
-1
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+115
-66
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+1
-1
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+5
-3
modules/stream_filter/smooth/downloader.c
modules/stream_filter/smooth/downloader.c
+1
-1
No files found.
modules/demux/dash/mp4/AtomsReader.cpp
View file @
27e7fb5d
...
...
@@ -58,7 +58,7 @@ bool AtomsReader::parseBlock(block_t *p_block, BaseRepresentation *rep)
memset
(
rootbox
,
0
,
sizeof
(
*
rootbox
));
rootbox
->
i_type
=
ATOM_root
;
rootbox
->
i_size
=
p_block
->
i_buffer
;
if
(
MP4_ReadBoxContainerChildren
(
stream
,
rootbox
,
0
)
==
1
)
if
(
MP4_ReadBoxContainerChildren
(
stream
,
rootbox
,
NULL
)
==
1
)
{
#ifndef NDEBUG
MP4_BoxDumpStructure
(
stream
,
rootbox
);
...
...
modules/demux/mp4/libmp4.c
View file @
27e7fb5d
This diff is collapsed.
Click to expand it.
modules/demux/mp4/libmp4.h
View file @
27e7fb5d
...
...
@@ -1709,7 +1709,7 @@ unsigned MP4_BoxCount( const MP4_Box_t *p_box, const char *psz_fmt, ... );
/* Internal functions exposed for MKV demux */
int
MP4_PeekBoxHeader
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
);
int
MP4_ReadBoxContainerChildren
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_container
,
uint32_t
i_last_child
);
const
uint32_t
stoplist
[]
);
int
MP4_ReadBox_sample_vide
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
);
void
MP4_FreeBox_sample_vide
(
MP4_Box_t
*
p_box
);
...
...
modules/demux/mp4/mp4.c
View file @
27e7fb5d
...
...
@@ -4443,7 +4443,8 @@ static int ProbeIndex( demux_t *p_demux )
stream_Seek
(
p_demux
->
s
,
i_stream_size
-
i_offset
)
==
VLC_SUCCESS
)
{
msg_Dbg
(
p_demux
,
"reading mfra index at %"
PRIu64
,
i_stream_size
-
i_offset
);
MP4_ReadBoxContainerChildren
(
p_demux
->
s
,
p_sys
->
p_root
,
ATOM_mfra
);
const
uint32_t
stoplist
[]
=
{
ATOM_mfra
,
0
};
MP4_ReadBoxContainerChildren
(
p_demux
->
s
,
p_sys
->
p_root
,
stoplist
);
}
}
...
...
@@ -4462,14 +4463,15 @@ static int ProbeFragments( demux_t *p_demux, bool b_force )
if
(
p_sys
->
b_fastseekable
||
b_force
)
{
MP4_ReadBoxContainerChildren
(
p_demux
->
s
,
p_sys
->
p_root
,
0
);
/* Get the rest of the file */
MP4_ReadBoxContainerChildren
(
p_demux
->
s
,
p_sys
->
p_root
,
NULL
);
/* Get the rest of the file */
p_sys
->
b_fragments_probed
=
true
;
}
else
{
/* We stop at first moof, which validates our fragmentation condition
* and we'll find others while reading. */
MP4_ReadBoxContainerChildren
(
p_demux
->
s
,
p_sys
->
p_root
,
ATOM_moof
);
const
uint32_t
stoplist
[]
=
{
ATOM_moof
,
0
};
MP4_ReadBoxContainerChildren
(
p_demux
->
s
,
p_sys
->
p_root
,
stoplist
);
}
if
(
!
p_sys
->
moovfragment
.
p_moox
)
...
...
modules/stream_filter/smooth/downloader.c
View file @
27e7fb5d
...
...
@@ -268,7 +268,7 @@ static int parse_chunk( stream_t *s, chunk_t *ck, sms_stream_t *sms )
MP4_Box_t
root_box
=
{
0
};
root_box
.
i_type
=
ATOM_root
;
root_box
.
i_size
=
ck
->
size
;
if
(
MP4_ReadBoxContainerChildren
(
ck_s
,
&
root_box
,
0
)
!=
1
)
if
(
MP4_ReadBoxContainerChildren
(
ck_s
,
&
root_box
,
NULL
)
!=
1
)
{
stream_Delete
(
ck_s
);
return
VLC_EGENERIC
;
...
...
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