Merge commit '78491fe8cfed83d2aead95dafe26f0d3f999e961'
authorHendrik Leppkes <h.leppkes@gmail.com>
Sun, 2 Aug 2015 08:41:45 +0000 (10:41 +0200)
committerHendrik Leppkes <h.leppkes@gmail.com>
Sun, 2 Aug 2015 08:41:45 +0000 (10:41 +0200)
* commit '78491fe8cfed83d2aead95dafe26f0d3f999e961':
  asfdec: do not export empty metadata

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
libavformat/asfdec_o.c

index 283807ad2e3a448ac31fe82446e95ec7eed96c4b..d53e271356294fd668098efbd6866a702542b80c 100644 (file)
@@ -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;
 }