Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
7b053f54
Commit
7b053f54
authored
Jan 23, 2006
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Don't crash if the hdlr in a mov has no name.
* spelling correction and debug for out of bound child boxes.
parent
1bccb7df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+22
-18
No files found.
modules/demux/mp4/libmp4.c
View file @
7b053f54
...
@@ -225,7 +225,7 @@ int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -225,7 +225,7 @@ int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box )
/*****************************************************************************
/*****************************************************************************
* MP4_NextBox : Go to the next box
* MP4_NextBox : Go to the next box
*****************************************************************************
*****************************************************************************
* if p_box == NULL, go to the next box in w
it
ch we are( at the begining ).
* if p_box == NULL, go to the next box in w
hi
ch we are( at the begining ).
*****************************************************************************/
*****************************************************************************/
static
int
MP4_NextBox
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
static
int
MP4_NextBox
(
stream_t
*
p_stream
,
MP4_Box_t
*
p_box
)
{
{
...
@@ -248,6 +248,7 @@ static int MP4_NextBox( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -248,6 +248,7 @@ static int MP4_NextBox( stream_t *p_stream, MP4_Box_t *p_box )
if
(
p_box
->
i_size
+
p_box
->
i_pos
>=
if
(
p_box
->
i_size
+
p_box
->
i_pos
>=
p_box
->
p_father
->
i_size
+
p_box
->
p_father
->
i_pos
)
p_box
->
p_father
->
i_size
+
p_box
->
p_father
->
i_pos
)
{
{
msg_Dbg
(
p_stream
,
"out of bound child"
);
return
0
;
/* out of bound */
return
0
;
/* out of bound */
}
}
}
}
...
@@ -582,7 +583,10 @@ static int MP4_ReadBox_hdlr( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -582,7 +583,10 @@ static int MP4_ReadBox_hdlr( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES
(
i_reserved
);
MP4_GET4BYTES
(
i_reserved
);
MP4_GET4BYTES
(
i_reserved
);
MP4_GET4BYTES
(
i_reserved
);
MP4_GET4BYTES
(
i_reserved
);
MP4_GET4BYTES
(
i_reserved
);
p_box
->
data
.
p_hdlr
->
psz_name
=
NULL
;
if
(
i_read
>
0
)
{
p_box
->
data
.
p_hdlr
->
psz_name
=
calloc
(
sizeof
(
char
),
i_read
+
1
);
p_box
->
data
.
p_hdlr
->
psz_name
=
calloc
(
sizeof
(
char
),
i_read
+
1
);
/* Yes, I love .mp4 :( */
/* Yes, I love .mp4 :( */
...
@@ -602,10 +606,10 @@ static int MP4_ReadBox_hdlr( stream_t *p_stream, MP4_Box_t *p_box )
...
@@ -602,10 +606,10 @@ static int MP4_ReadBox_hdlr( stream_t *p_stream, MP4_Box_t *p_box )
memcpy
(
p_box
->
data
.
p_hdlr
->
psz_name
,
p_peek
,
i_read
);
memcpy
(
p_box
->
data
.
p_hdlr
->
psz_name
,
p_peek
,
i_read
);
p_box
->
data
.
p_hdlr
->
psz_name
[
i_read
]
=
'\0'
;
p_box
->
data
.
p_hdlr
->
psz_name
[
i_read
]
=
'\0'
;
}
}
}
#ifdef MP4_VERBOSE
#ifdef MP4_VERBOSE
msg_Dbg
(
p_stream
,
"read box:
\"
hdlr
\"
hanler type %4.4s name %s"
,
msg_Dbg
(
p_stream
,
"read box:
\"
hdlr
\"
han
d
ler type %4.4s name %s"
,
(
char
*
)
&
p_box
->
data
.
p_hdlr
->
i_handler_type
,
(
char
*
)
&
p_box
->
data
.
p_hdlr
->
i_handler_type
,
p_box
->
data
.
p_hdlr
->
psz_name
);
p_box
->
data
.
p_hdlr
->
psz_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