Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
977d4a3b
Commit
977d4a3b
authored
Jan 15, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpdec_mpeg4: Check the return value from malloc
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
42364fcb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
rtpdec_mpeg4.c
libavformat/rtpdec_mpeg4.c
+5
-1
No files found.
libavformat/rtpdec_mpeg4.c
View file @
977d4a3b
...
...
@@ -137,6 +137,8 @@ static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf)
if
(
!
data
->
au_headers
||
data
->
au_headers_allocated
<
data
->
nb_au_headers
)
{
av_free
(
data
->
au_headers
);
data
->
au_headers
=
av_malloc
(
sizeof
(
struct
AUHeaders
)
*
data
->
nb_au_headers
);
if
(
!
data
->
au_headers
)
return
AVERROR
(
ENOMEM
);
data
->
au_headers_allocated
=
data
->
nb_au_headers
;
}
...
...
@@ -162,6 +164,7 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data,
const
uint8_t
*
buf
,
int
len
,
uint16_t
seq
,
int
flags
)
{
int
ret
;
if
(
rtp_parse_mp4_au
(
data
,
buf
))
return
-
1
;
...
...
@@ -170,7 +173,8 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data,
/* XXX: Fixme we only handle the case where rtp_parse_mp4_au define
one au_header */
av_new_packet
(
pkt
,
data
->
au_headers
[
0
].
size
);
if
((
ret
=
av_new_packet
(
pkt
,
data
->
au_headers
[
0
].
size
))
<
0
)
return
ret
;
memcpy
(
pkt
->
data
,
buf
,
data
->
au_headers
[
0
].
size
);
pkt
->
stream_index
=
st
->
index
;
...
...
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