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
141f0354
Commit
141f0354
authored
Jun 19, 2011
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: do not crash in av_set_options_string() if opts == NULL
Add missing NULL check, and update documentation accordingly.
parent
15f03725
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletion
+4
-1
avutil.h
libavutil/avutil.h
+1
-1
opt.c
libavutil/opt.c
+2
-0
opt.h
libavutil/opt.h
+1
-0
No files found.
libavutil/avutil.h
View file @
141f0354
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MAJOR 51
#define LIBAVUTIL_VERSION_MINOR 9
#define LIBAVUTIL_VERSION_MINOR 9
#define LIBAVUTIL_VERSION_MICRO
0
#define LIBAVUTIL_VERSION_MICRO
1
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
LIBAVUTIL_VERSION_MINOR, \
...
...
libavutil/opt.c
View file @
141f0354
...
@@ -521,6 +521,8 @@ int av_set_options_string(void *ctx, const char *opts,
...
@@ -521,6 +521,8 @@ int av_set_options_string(void *ctx, const char *opts,
{
{
int
ret
,
count
=
0
;
int
ret
,
count
=
0
;
if
(
!
opts
)
return
0
;
while
(
*
opts
)
{
while
(
*
opts
)
{
if
((
ret
=
parse_key_value_pair
(
ctx
,
&
opts
,
key_val_sep
,
pairs_sep
))
<
0
)
if
((
ret
=
parse_key_value_pair
(
ctx
,
&
opts
,
key_val_sep
,
pairs_sep
))
<
0
)
return
ret
;
return
ret
;
...
...
libavutil/opt.h
View file @
141f0354
...
@@ -169,6 +169,7 @@ void av_opt_set_defaults2(void *s, int mask, int flags);
...
@@ -169,6 +169,7 @@ void av_opt_set_defaults2(void *s, int mask, int flags);
* key. ctx must be an AVClass context, storing is done using
* key. ctx must be an AVClass context, storing is done using
* AVOptions.
* AVOptions.
*
*
* @param opts options string to parse, may be NULL
* @param key_val_sep a 0-terminated list of characters used to
* @param key_val_sep a 0-terminated list of characters used to
* separate key from value
* separate key from value
* @param pairs_sep a 0-terminated list of characters used to separate
* @param pairs_sep a 0-terminated list of characters used to separate
...
...
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