avutil/opt: Simplify av_opt_set_dict2()

Make it clearer that the ordinary exit always returns 0.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-13 13:35:36 +02:00
parent 3ba1bbf8d0
commit 3df34e7bf7
1 changed files with 2 additions and 3 deletions

View File

@ -1635,7 +1635,7 @@ int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
{
AVDictionaryEntry *t = NULL;
AVDictionary *tmp = NULL;
int ret = 0;
int ret;
if (!options)
return 0;
@ -1649,11 +1649,10 @@ int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
av_dict_free(&tmp);
return ret;
}
ret = 0;
}
av_dict_free(options);
*options = tmp;
return ret;
return 0;
}
int av_opt_set_dict(void *obj, AVDictionary **options)