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
d43cd6b0
Commit
d43cd6b0
authored
May 04, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ffv1dec: Check chroma shift parameters
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
03baa861
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
ffv1dec.c
libavcodec/ffv1dec.c
+12
-0
No files found.
libavcodec/ffv1dec.c
View file @
d43cd6b0
...
@@ -547,6 +547,12 @@ static int read_extra_header(FFV1Context *f)
...
@@ -547,6 +547,12 @@ static int read_extra_header(FFV1Context *f)
f
->
num_h_slices
=
1
+
get_symbol
(
c
,
state
,
0
);
f
->
num_h_slices
=
1
+
get_symbol
(
c
,
state
,
0
);
f
->
num_v_slices
=
1
+
get_symbol
(
c
,
state
,
0
);
f
->
num_v_slices
=
1
+
get_symbol
(
c
,
state
,
0
);
if
(
f
->
chroma_h_shift
>
4U
||
f
->
chroma_v_shift
>
4U
)
{
av_log
(
f
->
avctx
,
AV_LOG_ERROR
,
"chroma shift parameters %d %d are invalid
\n
"
,
f
->
chroma_h_shift
,
f
->
chroma_v_shift
);
return
AVERROR_INVALIDDATA
;
}
if
(
f
->
num_h_slices
>
(
unsigned
)
f
->
width
||
!
f
->
num_h_slices
||
if
(
f
->
num_h_slices
>
(
unsigned
)
f
->
width
||
!
f
->
num_h_slices
||
f
->
num_v_slices
>
(
unsigned
)
f
->
height
||
!
f
->
num_v_slices
f
->
num_v_slices
>
(
unsigned
)
f
->
height
||
!
f
->
num_v_slices
)
{
)
{
...
@@ -652,6 +658,12 @@ static int read_header(FFV1Context *f)
...
@@ -652,6 +658,12 @@ static int read_header(FFV1Context *f)
}
}
}
}
if
(
chroma_h_shift
>
4U
||
chroma_v_shift
>
4U
)
{
av_log
(
f
->
avctx
,
AV_LOG_ERROR
,
"chroma shift parameters %d %d are invalid
\n
"
,
chroma_h_shift
,
chroma_v_shift
);
return
AVERROR_INVALIDDATA
;
}
f
->
colorspace
=
colorspace
;
f
->
colorspace
=
colorspace
;
f
->
avctx
->
bits_per_raw_sample
=
bits_per_raw_sample
;
f
->
avctx
->
bits_per_raw_sample
=
bits_per_raw_sample
;
f
->
chroma_planes
=
chroma_planes
;
f
->
chroma_planes
=
chroma_planes
;
...
...
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