diff options
author | Marton Balint <cus@passwd.hu> | 2016-10-06 23:43:03 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2016-10-11 18:05:28 +0200 |
commit | 24022402be4cf3311c673b9a9096081e263b91e2 (patch) | |
tree | 182a87d936c3b9ff644523c58886620b056e4e29 | |
parent | 99d68d462fbd777cfd3fe055d4181a6f7c03fac7 (diff) | |
download | ffmpeg-24022402be4cf3311c673b9a9096081e263b91e2.tar.gz |
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>
-rw-r--r-- | libavfilter/f_metadata.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index f4a929c1d5..f2c71d98b4 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -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); |