summaryrefslogtreecommitdiff
path: root/libavutil/opt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r--libavutil/opt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 4e25918ed1..172fcec456 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -520,6 +520,14 @@ int av_set_options_string(void *ctx, const char *opts,
return count;
}
+void av_opt_free(void *obj)
+{
+ const AVOption *o = NULL;
+ while ((o = av_next_option(obj, o)))
+ if (o->type == FF_OPT_TYPE_STRING || o->type == FF_OPT_TYPE_BINARY)
+ av_freep((uint8_t *)obj + o->offset);
+}
+
#ifdef TEST
#undef printf