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
ba3a2185
Commit
ba3a2185
authored
May 05, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: absolute pos is unsigned
parent
a55c3005
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+7
-4
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+1
-1
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+3
-2
No files found.
modules/demux/mp4/libmp4.c
View file @
ba3a2185
...
...
@@ -244,7 +244,8 @@ static int MP4_ReadBoxContainerChildrenIndexed( stream_t *p_stream,
return
0
;
}
off_t
i_end
=
p_container
->
i_pos
+
p_container
->
i_size
;
uint64_t
i_end
=
p_container
->
i_pos
+
p_container
->
i_size
;
int
i_tell
;
do
{
...
...
@@ -263,7 +264,8 @@ static int MP4_ReadBoxContainerChildrenIndexed( stream_t *p_stream,
/* chain this box with the father and the other at same level */
MP4_BoxAddChild
(
p_container
,
p_box
);
if
(
p_container
->
i_size
&&
stream_Tell
(
p_stream
)
==
i_end
)
i_tell
=
stream_Tell
(
p_stream
);
if
(
p_container
->
i_size
&&
i_tell
>=
0
&&
(
unsigned
)
i_tell
==
i_end
)
break
;
if
(
p_box
->
i_type
==
i_last_child
)
...
...
@@ -274,7 +276,8 @@ static int MP4_ReadBoxContainerChildrenIndexed( stream_t *p_stream,
}
while
(
MP4_NextBox
(
p_stream
,
p_box
)
==
1
);
if
(
p_container
->
i_size
&&
stream_Tell
(
p_stream
)
!=
i_end
)
i_tell
=
stream_Tell
(
p_stream
);
if
(
p_container
->
i_size
&&
i_tell
>=
0
&&
(
unsigned
)
i_tell
!=
i_end
)
MP4_Seek
(
p_stream
,
i_end
);
return
1
;
...
...
@@ -4003,7 +4006,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father )
if
(
!
(
MP4_Box_Function
[
i_index
].
MP4_ReadBox_function
)(
p_stream
,
p_box
)
)
{
off
_t
i_end
=
p_box
->
i_pos
+
p_box
->
i_size
;
uint64
_t
i_end
=
p_box
->
i_pos
+
p_box
->
i_size
;
MP4_BoxFree
(
p_stream
,
p_box
);
MP4_Seek
(
p_stream
,
i_end
);
/* Skip the failed box */
return
NULL
;
...
...
modules/demux/mp4/libmp4.h
View file @
ba3a2185
...
...
@@ -1489,7 +1489,7 @@ typedef struct MP4_Box_s MP4_Box_t;
/* the most basic structure */
struct
MP4_Box_s
{
off_t
i_pos
;
/* absolute position */
uint64_t
i_pos
;
/* absolute position */
uint32_t
i_type
;
uint32_t
i_shortsize
;
...
...
modules/demux/mp4/mp4.c
View file @
ba3a2185
...
...
@@ -4037,7 +4037,7 @@ static MP4_Box_t * LoadNextChunk( demux_t *p_demux )
return
p_chunk
;
}
static
bool
BoxExistsInRootTree
(
MP4_Box_t
*
p_root
,
uint32_t
i_type
,
off
_t
i_pos
)
static
bool
BoxExistsInRootTree
(
MP4_Box_t
*
p_root
,
uint32_t
i_type
,
uint64
_t
i_pos
)
{
while
(
p_root
)
{
...
...
@@ -5125,7 +5125,8 @@ static int DemuxAsLeaf( demux_t *p_demux )
if
(
p_sys
->
context
.
i_current_box_type
!=
ATOM_mdat
)
{
if
(
!
BoxExistsInRootTree
(
p_sys
->
p_root
,
p_sys
->
context
.
i_current_box_type
,
stream_Tell
(
p_demux
->
s
)
)
)
const
int
i_tell
=
stream_Tell
(
p_demux
->
s
);
if
(
i_tell
>=
0
&&
!
BoxExistsInRootTree
(
p_sys
->
p_root
,
p_sys
->
context
.
i_current_box_type
,
(
uint64_t
)
i_tell
)
)
{
// only if !b_probed ??
MP4_Box_t
*
p_vroot
=
LoadNextChunk
(
p_demux
);
...
...
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