From c95dfe5cce98cde3e7fb14fbd04b3897f3927cec Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Fri, 17 Jan 2020 15:39:51 +0530 Subject: [PATCH] avfilter/f_metadata: correct check for existing metadata When adding metadata, existing dictionary need not be present. --- libavfilter/f_metadata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index bf298e9d39..598257b15b 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -304,7 +304,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) AVDictionary **metadata = &frame->metadata; AVDictionaryEntry *e; - if (!*metadata) + if (!*metadata && s->mode != METADATA_ADD) return ff_filter_frame(outlink, frame); e = av_dict_get(*metadata, !s->key ? "" : s->key, NULL,