Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
0aedf90e
Commit
0aedf90e
authored
Dec 07, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/opt: factor set_string_color() out
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
758d4e40
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
opt.c
libavutil/opt.c
+16
-10
No files found.
libavutil/opt.c
View file @
0aedf90e
...
...
@@ -280,6 +280,21 @@ static int set_string_video_rate(void *obj, const AVOption *o, const char *val,
return
ret
;
}
static
int
set_string_color
(
void
*
obj
,
const
AVOption
*
o
,
const
char
*
val
,
uint8_t
*
dst
)
{
int
ret
;
if
(
!
val
)
{
return
0
;
}
else
{
ret
=
av_parse_color
(
dst
,
val
,
-
1
,
obj
);
if
(
ret
<
0
)
av_log
(
obj
,
AV_LOG_ERROR
,
"Unable to parse option value
\"
%s
\"
as color
\n
"
,
val
);
return
ret
;
}
return
0
;
}
#if FF_API_OLD_AVOPTIONS
int
av_set_string3
(
void
*
obj
,
const
char
*
name
,
const
char
*
val
,
int
alloc
,
const
AVOption
**
o_out
)
{
...
...
@@ -358,16 +373,7 @@ int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
return
ret
;
}
break
;
case
AV_OPT_TYPE_COLOR
:
if
(
!
val
)
{
return
0
;
}
else
{
ret
=
av_parse_color
(
dst
,
val
,
-
1
,
obj
);
if
(
ret
<
0
)
av_log
(
obj
,
AV_LOG_ERROR
,
"Unable to parse option value
\"
%s
\"
as color
\n
"
,
val
);
return
ret
;
}
break
;
case
AV_OPT_TYPE_COLOR
:
return
set_string_color
(
obj
,
o
,
val
,
dst
);
case
AV_OPT_TYPE_CHANNEL_LAYOUT
:
if
(
!
val
||
!
strcmp
(
val
,
"none"
))
{
*
(
int64_t
*
)
dst
=
0
;
...
...
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