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
71658818
Commit
71658818
authored
Apr 17, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/stereo3d: check input width & height
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
2787f7b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
vf_stereo3d.c
libavfilter/vf_stereo3d.c
+28
-0
No files found.
libavfilter/vf_stereo3d.c
View file @
71658818
...
...
@@ -196,6 +196,34 @@ static int config_output(AVFilterLink *outlink)
Stereo3DContext
*
s
=
ctx
->
priv
;
AVRational
aspect
=
inlink
->
sample_aspect_ratio
;
switch
(
s
->
in
.
format
)
{
case
SIDE_BY_SIDE_2_LR
:
case
SIDE_BY_SIDE_LR
:
case
SIDE_BY_SIDE_2_RL
:
case
SIDE_BY_SIDE_RL
:
if
(
inlink
->
w
&
1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"width must be even
\n
"
);
return
AVERROR_INVALIDDATA
;
}
break
;
case
ABOVE_BELOW_2_LR
:
case
ABOVE_BELOW_LR
:
case
ABOVE_BELOW_2_RL
:
case
ABOVE_BELOW_RL
:
if
(
s
->
out
.
format
==
INTERLEAVE_ROWS_LR
||
s
->
out
.
format
==
INTERLEAVE_ROWS_RL
)
{
if
(
inlink
->
h
&
3
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"height must be multiple of 4
\n
"
);
return
AVERROR_INVALIDDATA
;
}
}
if
(
inlink
->
h
&
1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"height must be even
\n
"
);
return
AVERROR_INVALIDDATA
;
}
break
;
}
s
->
in
.
width
=
s
->
width
=
inlink
->
w
;
s
->
in
.
height
=
...
...
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