avfilter/f_metadata: correct check for existing metadata

When adding metadata, existing dictionary need not be present.
This commit is contained in:
Gyan Doshi 2020-01-17 15:39:51 +05:30
parent 7fc28465df
commit c95dfe5cce

View File

@ -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,