Commit ffdd2e91 authored by Clément Bœsch's avatar Clément Bœsch Committed by Anton Khirnov

lavf/id3v2: do not export empty fields.

This also avoids a memleak.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 4e48aa86
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment