Commit 6ad974ae authored by Clément Bœsch's avatar Clément Bœsch

lavf/id3v2: do not export empty fields.

This also avoids a memleak.
parent 4fd57397
......@@ -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);
......
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