lavf/id3v2: do not export empty fields.
authorClément Bœsch <ubitux@gmail.com>
Sat, 12 May 2012 20:31:11 +0000 (22:31 +0200)
committerClément Bœsch <ubitux@gmail.com>
Sat, 19 May 2012 10:29:30 +0000 (12:29 +0200)
This also avoids a memleak.

libavformat/id3v2.c

index 1352b57..97a23c4 100644 (file)
@@ -303,6 +303,8 @@ static void read_ttag(AVFormatContext *s, AVIOContext *pb, int taglen, const cha
     }
     else if (*dst)
         dict_flags |= AV_DICT_DONT_STRDUP_VAL;
+    else
+        av_freep(&dst);
 
     if (dst)
         av_dict_set(&s->metadata, key, dst, dict_flags);