Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> --- libavfilter/avfilter.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 11d4e01807..cc499fd5ed 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -822,6 +822,7 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, while (*args) { const char *shorthand = NULL; + int flags = AV_DICT_DONT_STRDUP_VAL; o = av_opt_next(ctx->priv, o); if (o) { @@ -846,6 +847,7 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, args++; if (parsed_key) { key = parsed_key; + flags |= AV_DICT_DONT_STRDUP_KEY; while ((o = av_opt_next(ctx->priv, o))); /* discard all remaining shorthand */ } else { key = shorthand; @@ -853,10 +855,7 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, av_log(ctx, AV_LOG_DEBUG, "Setting '%s' to value '%s'\n", key, value); - av_dict_set(options, key, value, 0); - - av_free(value); - av_free(parsed_key); + av_dict_set(options, key, value, flags); } return 0; -- 2.30.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".