Browse Source

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

tags/n0.9
Anton Khirnov 14 years ago
parent
commit
85afbb1d00
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavutil/opt.c

+ 3
- 0
libavutil/opt.c View File

@@ -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…
Cancel
Save