Browse Source

lavf/id3v2: do not export empty fields.

This also avoids a memleak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n1.0
Clément Bœsch Anton Khirnov 13 years ago
parent
commit
ffdd2e9144
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/id3v2.c

+ 2
- 0
libavformat/id3v2.c View File

@@ -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);


Loading…
Cancel
Save