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
da31e537
Commit
da31e537
authored
Oct 13, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: handle AV_OPT_TYPE_CONST too
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e91230a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
opt.c
libavutil/opt.c
+2
-0
No files found.
libavutil/opt.c
View file @
da31e537
...
...
@@ -71,6 +71,7 @@ static int read_number(const AVOption *o, void *dst, double *num, int *den, int6
case
AV_OPT_TYPE_RATIONAL
:
*
intnum
=
((
AVRational
*
)
dst
)
->
num
;
*
den
=
((
AVRational
*
)
dst
)
->
den
;
return
0
;
case
AV_OPT_TYPE_CONST
:
*
num
=
o
->
default_val
.
dbl
;
return
0
;
}
return
AVERROR
(
EINVAL
);
}
...
...
@@ -341,6 +342,7 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c
case
AV_OPT_TYPE_FLOAT
:
snprintf
(
buf
,
buf_len
,
"%f"
,
*
(
float
*
)
dst
);
break
;
case
AV_OPT_TYPE_DOUBLE
:
snprintf
(
buf
,
buf_len
,
"%f"
,
*
(
double
*
)
dst
);
break
;
case
AV_OPT_TYPE_RATIONAL
:
snprintf
(
buf
,
buf_len
,
"%d/%d"
,
((
AVRational
*
)
dst
)
->
num
,
((
AVRational
*
)
dst
)
->
den
);
break
;
case
AV_OPT_TYPE_CONST
:
snprintf
(
buf
,
buf_len
,
"%f"
,
o
->
default_val
.
dbl
);
break
;
case
AV_OPT_TYPE_STRING
:
return
*
(
void
**
)
dst
;
case
AV_OPT_TYPE_BINARY
:
len
=
*
(
int
*
)(((
uint8_t
*
)
dst
)
+
sizeof
(
uint8_t
*
));
...
...
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