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
6c249392
Commit
6c249392
authored
Apr 07, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg4videodec: make sure f/b_code are not invalid values.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6560fa39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+6
-0
No files found.
libavcodec/mpeg4videodec.c
View file @
6c249392
...
...
@@ -2073,6 +2073,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
s
->
f_code
=
get_bits
(
gb
,
3
);
/* fcode_for */
if
(
s
->
f_code
==
0
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Error, header damaged or not MPEG4 header (f_code=0)
\n
"
);
s
->
f_code
=
1
;
return
-
1
;
// makes no sense to continue, as the MV decoding will break very quickly
}
}
else
...
...
@@ -2080,6 +2081,11 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
if
(
s
->
pict_type
==
AV_PICTURE_TYPE_B
)
{
s
->
b_code
=
get_bits
(
gb
,
3
);
if
(
s
->
b_code
==
0
){
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Error, header damaged or not MPEG4 header (b_code=0)
\n
"
);
s
->
b_code
=
1
;
return
-
1
;
// makes no sense to continue, as the MV decoding will break very quickly
}
}
else
s
->
b_code
=
1
;
...
...
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