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
b91fa5fc
Commit
b91fa5fc
authored
Nov 03, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavu/opt: set sample format default value, and accept NULL value
Fix commit
c9eaa98a
. +10l.
parent
1dad4867
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
opt.c
libavutil/opt.c
+4
-1
No files found.
libavutil/opt.c
View file @
b91fa5fc
...
...
@@ -242,7 +242,9 @@ int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
const
AVOption
*
o
=
av_opt_find2
(
obj
,
name
,
NULL
,
0
,
search_flags
,
&
target_obj
);
if
(
!
o
||
!
target_obj
)
return
AVERROR_OPTION_NOT_FOUND
;
if
(
!
val
&&
(
o
->
type
!=
AV_OPT_TYPE_STRING
&&
o
->
type
!=
AV_OPT_TYPE_PIXEL_FMT
&&
o
->
type
!=
AV_OPT_TYPE_IMAGE_SIZE
))
if
(
!
val
&&
(
o
->
type
!=
AV_OPT_TYPE_STRING
&&
o
->
type
!=
AV_OPT_TYPE_PIXEL_FMT
&&
o
->
type
!=
AV_OPT_TYPE_SAMPLE_FMT
&&
o
->
type
!=
AV_OPT_TYPE_IMAGE_SIZE
))
return
AVERROR
(
EINVAL
);
dst
=
((
uint8_t
*
)
target_obj
)
+
o
->
offset
;
...
...
@@ -738,6 +740,7 @@ void av_opt_set_defaults2(void *s, int mask, int flags)
case
AV_OPT_TYPE_STRING
:
case
AV_OPT_TYPE_IMAGE_SIZE
:
case
AV_OPT_TYPE_PIXEL_FMT
:
case
AV_OPT_TYPE_SAMPLE_FMT
:
av_opt_set
(
s
,
opt
->
name
,
opt
->
default_val
.
str
,
0
);
break
;
case
AV_OPT_TYPE_BINARY
:
...
...
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