summaryrefslogtreecommitdiff
path: root/libavutil/opt.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-13 13:35:36 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-20 00:25:16 +0200
commit3df34e7bf7bd75d9fa2ca83f7d5baec45cc95a1c (patch)
tree14efcce5adb6f98f9833f6604b2037ad92db76a5 /libavutil/opt.c
parent3ba1bbf8d0796bc5a4f9b78b02616b0fc9ff9048 (diff)
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>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r--libavutil/opt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 24b8899ca0..f05283d610 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -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)