avfilter/f_metadata: do not return the frame early if there is no metadata

The early return caused isses for the "add" mode (got fixed in
c95dfe5cce98cde3e7fb14fbd04b3897f3927cec) and the "select" mode needs a similar
fix. It is probably better to fully remove the check, since all modes work
correctly with NULL metadata.

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2021-06-22 22:59:03 +02:00
parent 29c95765e8
commit 758e2da289

View File

@ -308,9 +308,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
AVDictionary **metadata = &frame->metadata;
AVDictionaryEntry *e;
if (!*metadata && s->mode != METADATA_ADD)
return ff_filter_frame(outlink, frame);
e = av_dict_get(*metadata, !s->key ? "" : s->key, NULL,
!s->key ? AV_DICT_IGNORE_SUFFIX: 0);