mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
opt: do not crash in av_set_options_string() if opts == NULL
Add missing NULL check, and update documentation accordingly.
This commit is contained in:
@@ -521,6 +521,8 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user