Skip to content

Commit

Permalink
avfilter/f_metadata: correct check for existing metadata
Browse files Browse the repository at this point in the history
When adding metadata, existing dictionary need not be present.
  • Loading branch information
GyanD committed Jan 17, 2020
1 parent 7fc2846 commit c95dfe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavfilter/f_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c95dfe5

Please sign in to comment.