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
53c853e0
Commit
53c853e0
authored
Jul 14, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h264_mp4toannexb: improve feedback in case of invalid bitstream
parent
a80e6229
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
h264_mp4toannexb_bsf.c
libavcodec/h264_mp4toannexb_bsf.c
+9
-3
No files found.
libavcodec/h264_mp4toannexb_bsf.c
View file @
53c853e0
...
...
@@ -81,9 +81,15 @@ static int h264_extradata_to_annexb(AVCodecContext *avctx, const int padding)
unit_size
=
AV_RB16
(
extradata
);
total_size
+=
unit_size
+
4
;
if
(
total_size
>
INT_MAX
-
padding
||
extradata
+
2
+
unit_size
>
avctx
->
extradata
+
avctx
->
extradata_size
)
{
if
(
total_size
>
INT_MAX
-
padding
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Too big extradata size, corrupted stream or invalid MP4/AVCC bitstream
\n
"
);
av_free
(
out
);
return
AVERROR
(
EINVAL
);
}
if
(
extradata
+
2
+
unit_size
>
avctx
->
extradata
+
avctx
->
extradata_size
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Packet header is not contained in global extradata, "
"corrupted stream or invalid MP4/AVCC bitstream
\n
"
);
av_free
(
out
);
return
AVERROR
(
EINVAL
);
}
...
...
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