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
dcf969e9
Commit
dcf969e9
authored
Feb 20, 2015
by
Gilles Chanteperdrix
Committed by
Martin Storsjö
Feb 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpdec_mpeg4: add more verbose error logging
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
96084251
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
rtpdec_mpeg4.c
libavformat/rtpdec_mpeg4.c
+18
-6
No files found.
libavformat/rtpdec_mpeg4.c
View file @
dcf969e9
...
@@ -171,12 +171,18 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data,
...
@@ -171,12 +171,18 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data,
int
ret
;
int
ret
;
if
(
!
buf
)
{
if
(
!
buf
)
{
if
(
data
->
cur_au_index
>
data
->
nb_au_headers
)
if
(
data
->
cur_au_index
>
data
->
nb_au_headers
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid parser state
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
if
(
data
->
buf_size
-
data
->
buf_pos
<
data
->
au_headers
[
data
->
cur_au_index
].
size
)
}
if
(
data
->
buf_size
-
data
->
buf_pos
<
data
->
au_headers
[
data
->
cur_au_index
].
size
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid AU size
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
if
((
ret
=
av_new_packet
(
pkt
,
data
->
au_headers
[
data
->
cur_au_index
].
size
))
<
0
)
}
if
((
ret
=
av_new_packet
(
pkt
,
data
->
au_headers
[
data
->
cur_au_index
].
size
))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Out of memory
\n
"
);
return
ret
;
return
ret
;
}
memcpy
(
pkt
->
data
,
&
data
->
buf
[
data
->
buf_pos
],
data
->
au_headers
[
data
->
cur_au_index
].
size
);
memcpy
(
pkt
->
data
,
&
data
->
buf
[
data
->
buf_pos
],
data
->
au_headers
[
data
->
cur_au_index
].
size
);
data
->
buf_pos
+=
data
->
au_headers
[
data
->
cur_au_index
].
size
;
data
->
buf_pos
+=
data
->
au_headers
[
data
->
cur_au_index
].
size
;
pkt
->
stream_index
=
st
->
index
;
pkt
->
stream_index
=
st
->
index
;
...
@@ -184,16 +190,22 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data,
...
@@ -184,16 +190,22 @@ static int aac_parse_packet(AVFormatContext *ctx, PayloadContext *data,
return
data
->
cur_au_index
<
data
->
nb_au_headers
;
return
data
->
cur_au_index
<
data
->
nb_au_headers
;
}
}
if
(
rtp_parse_mp4_au
(
data
,
buf
,
len
))
if
(
rtp_parse_mp4_au
(
data
,
buf
,
len
))
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing AU headers
\n
"
);
return
-
1
;
return
-
1
;
}
buf
+=
data
->
au_headers_length_bytes
+
2
;
buf
+=
data
->
au_headers_length_bytes
+
2
;
len
-=
data
->
au_headers_length_bytes
+
2
;
len
-=
data
->
au_headers_length_bytes
+
2
;
if
(
len
<
data
->
au_headers
[
0
].
size
)
if
(
len
<
data
->
au_headers
[
0
].
size
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"First AU larger than packet size
\n
"
);
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
if
((
ret
=
av_new_packet
(
pkt
,
data
->
au_headers
[
0
].
size
))
<
0
)
}
if
((
ret
=
av_new_packet
(
pkt
,
data
->
au_headers
[
0
].
size
))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Out of memory
\n
"
);
return
ret
;
return
ret
;
}
memcpy
(
pkt
->
data
,
buf
,
data
->
au_headers
[
0
].
size
);
memcpy
(
pkt
->
data
,
buf
,
data
->
au_headers
[
0
].
size
);
len
-=
data
->
au_headers
[
0
].
size
;
len
-=
data
->
au_headers
[
0
].
size
;
buf
+=
data
->
au_headers
[
0
].
size
;
buf
+=
data
->
au_headers
[
0
].
size
;
...
...
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