aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/asfdec.c
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-07-27 19:42:15 +0200
committerAnton Khirnov <anton@khirnov.net>2015-07-31 09:09:27 +0200
commit78491fe8cfed83d2aead95dafe26f0d3f999e961 (patch)
treeb53c79ce7f334adf9d471dd692ce0cfb369d6129 /libavformat/asfdec.c
parent3e853ff7acc56b180950ab39e7282f1b938c8784 (diff)
downloadffmpeg-78491fe8cfed83d2aead95dafe26f0d3f999e961.tar.gz
asfdec: do not export empty metadata
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r--libavformat/asfdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 72c59168a8..790102b378 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -256,8 +256,10 @@ static int asf_read_metadata(AVFormatContext *s, const char *title, uint16_t len
AVIOContext *pb = s->pb;
avio_get_str16le(pb, len, ch, buflen);
- if (av_dict_set(&s->metadata, title, ch, 0) < 0)
- av_log(s, AV_LOG_WARNING, "av_dict_set failed.\n");
+ if (ch[0]) {
+ if (av_dict_set(&s->metadata, title, ch, 0) < 0)
+ av_log(s, AV_LOG_WARNING, "av_dict_set failed.\n");
+ }
return 0;
}