mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
AVOptions: don't segfault on NULL parameter in av_set_options_string()
This commit is contained in:
parent
ab2940691b
commit
85afbb1d00
@ -696,6 +696,9 @@ 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;
|
||||||
|
Loading…
Reference in New Issue
Block a user