aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-05-12 22:31:11 +0200
committerAnton Khirnov <anton@khirnov.net>2012-09-17 15:48:20 +0200
commitffdd2e9144f45082ce31f93c20136ade6ed51a54 (patch)
tree6eadef4bd65e2f3ad38b362ebedb8f5deae85b87 /libavformat/id3v2.c
parent4e48aa86563279bf833b3ebcc2eaa1ff97189d91 (diff)
downloadffmpeg-ffdd2e9144f45082ce31f93c20136ade6ed51a54.tar.gz
lavf/id3v2: do not export empty fields.
This also avoids a memleak. Signed-off-by: Anton Khirnov <anton@khirnov.net>
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 e12e930924..da027800e1 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -293,6 +293,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);