AVOptions: don't segfault on NULL parameter in av_set_options_string()

This commit is contained in:
Anton Khirnov 2011-10-01 14:42:53 +02:00
parent ab2940691b
commit 85afbb1d00

View File

@ -696,6 +696,9 @@ int av_set_options_string(void *ctx, const char *opts,
{
int ret, count = 0;
if (!opts)
return 0;
while (*opts) {
if ((ret = parse_key_value_pair(ctx, &opts, key_val_sep, pairs_sep)) < 0)
return ret;