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>
pull/369/head
Andreas Rheinhardt 3 years ago
parent 3ba1bbf8d0
commit 3df34e7bf7
  1. 5
      libavutil/opt.c

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

Loading…
Cancel
Save