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
275516f8
Commit
275516f8
authored
Sep 23, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vf_drawtext: set string defaults in the options array
Simplify.
parent
482ce0ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
vf_drawtext.c
libavfilter/vf_drawtext.c
+3
-6
No files found.
libavfilter/vf_drawtext.c
View file @
275516f8
...
...
@@ -145,9 +145,9 @@ static const AVOption drawtext_options[]= {
{
"fontfile"
,
"set font file"
,
OFFSET
(
fontfile
),
FF_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
},
{
"text"
,
"set text"
,
OFFSET
(
text
),
FF_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
},
{
"textfile"
,
"set text file"
,
OFFSET
(
textfile
),
FF_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
},
{
"fontcolor"
,
"set foreground color"
,
OFFSET
(
fontcolor_string
),
FF_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
},
{
"boxcolor"
,
"set box color"
,
OFFSET
(
boxcolor_string
),
FF_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
},
{
"shadowcolor"
,
"set shadow color"
,
OFFSET
(
shadowcolor_string
),
FF_OPT_TYPE_STRING
,
{.
str
=
NULL
},
CHAR_MIN
,
CHAR_MAX
},
{
"fontcolor"
,
"set foreground color"
,
OFFSET
(
fontcolor_string
),
FF_OPT_TYPE_STRING
,
{.
str
=
"black"
},
CHAR_MIN
,
CHAR_MAX
},
{
"boxcolor"
,
"set box color"
,
OFFSET
(
boxcolor_string
),
FF_OPT_TYPE_STRING
,
{.
str
=
"white"
},
CHAR_MIN
,
CHAR_MAX
},
{
"shadowcolor"
,
"set shadow color"
,
OFFSET
(
shadowcolor_string
),
FF_OPT_TYPE_STRING
,
{.
str
=
"black"
},
CHAR_MIN
,
CHAR_MAX
},
{
"box"
,
"set box"
,
OFFSET
(
draw_box
),
FF_OPT_TYPE_INT
,
{.
dbl
=
0
},
0
,
1
},
{
"fontsize"
,
"set font size"
,
OFFSET
(
fontsize
),
FF_OPT_TYPE_INT
,
{.
dbl
=
16
},
1
,
INT_MAX
},
{
"x"
,
"set x expression"
,
OFFSET
(
x_expr
),
FF_OPT_TYPE_STRING
,
{.
str
=
"0"
},
CHAR_MIN
,
CHAR_MAX
},
...
...
@@ -282,9 +282,6 @@ static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
dtext
->
class
=
&
drawtext_class
;
av_opt_set_defaults
(
dtext
);
dtext
->
fontcolor_string
=
av_strdup
(
"black"
);
dtext
->
boxcolor_string
=
av_strdup
(
"white"
);
dtext
->
shadowcolor_string
=
av_strdup
(
"black"
);
if
((
err
=
(
av_set_options_string
(
dtext
,
args
,
"="
,
":"
)))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Error parsing options string: '%s'
\n
"
,
args
);
...
...
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