summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-05-12 22:31:11 +0200
committerClément Bœsch <ubitux@gmail.com>2012-05-19 12:29:30 +0200
commit6ad974ae1cd0c828d6dd5a665e830c10c93344b6 (patch)
treef9d20b918c9f16bb64bbf5be733c8f7eb1021440 /libavformat/id3v2.c
parent4fd573970af4b1667d9da28a7c8e018de59c53ab (diff)
lavf/id3v2: do not export empty fields.
This also avoids a memleak.
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 1352b57b63..97a23c48f1 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -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);