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
4c205f42
Commit
4c205f42
authored
Mar 18, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_drawbox: make config_props work properly when called multiple times.
Do not overwrite the variables set through AVOptions.
parent
90d9a2a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
vf_drawbox.c
libavfilter/vf_drawbox.c
+5
-5
No files found.
libavfilter/vf_drawbox.c
View file @
4c205f42
...
...
@@ -38,7 +38,7 @@ enum { Y, U, V, A };
typedef
struct
{
const
AVClass
*
class
;
int
x
,
y
,
w
,
h
;
int
x
,
y
,
w
_opt
,
h_opt
,
w
,
h
;
char
*
color_str
;
unsigned
char
yuv_color
[
4
];
int
vsub
,
hsub
;
///< chroma subsampling
...
...
@@ -82,8 +82,8 @@ static int config_input(AVFilterLink *inlink)
s
->
hsub
=
desc
->
log2_chroma_w
;
s
->
vsub
=
desc
->
log2_chroma_h
;
if
(
s
->
w
==
0
)
s
->
w
=
inlink
->
w
;
if
(
s
->
h
==
0
)
s
->
h
=
inlink
->
h
;
s
->
w
=
(
s
->
w_opt
>
0
)
?
s
->
w_opt
:
inlink
->
w
;
s
->
h
=
(
s
->
h_opt
>
0
)
?
s
->
h_opt
:
inlink
->
h
;
av_log
(
inlink
->
dst
,
AV_LOG_VERBOSE
,
"x:%d y:%d w:%d h:%d color:0x%02X%02X%02X%02X
\n
"
,
s
->
w
,
s
->
y
,
s
->
w
,
s
->
h
,
...
...
@@ -125,8 +125,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static
const
AVOption
options
[]
=
{
{
"x"
,
"Horizontal position of the left box edge"
,
OFFSET
(
x
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
INT_MIN
,
INT_MAX
,
FLAGS
},
{
"y"
,
"Vertical position of the top box edge"
,
OFFSET
(
y
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
INT_MIN
,
INT_MAX
,
FLAGS
},
{
"width"
,
"Width of the box"
,
OFFSET
(
w
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
FLAGS
},
{
"height"
,
"Height of the box"
,
OFFSET
(
h
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
FLAGS
},
{
"width"
,
"Width of the box"
,
OFFSET
(
w
_opt
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
FLAGS
},
{
"height"
,
"Height of the box"
,
OFFSET
(
h
_opt
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
FLAGS
},
{
"color"
,
"Color of the box"
,
OFFSET
(
color_str
),
AV_OPT_TYPE_STRING
,
{
.
str
=
"black"
},
.
flags
=
FLAGS
},
{
NULL
},
};
...
...
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