lavfi/metadata: fix metadata deletion if comparison returns false

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2016-10-06 23:43:03 +02:00
parent 99d68d462f
commit 24022402be

View File

@ -330,9 +330,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
case METADATA_DELETE:
if (!s->key) {
av_dict_free(metadata);
} else if (e && e->value && s->value && s->compare(s, e->value, s->value)) {
av_dict_set(metadata, s->key, NULL, 0);
} else if (e && e->value) {
} else if (e && e->value && (!s->value || s->compare(s, e->value, s->value))) {
av_dict_set(metadata, s->key, NULL, 0);
}
return ff_filter_frame(outlink, frame);