Browse Source

avformat/id3v2: fix memleak with empty strings

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2
Michael Niedermayer 9 years ago
parent
commit
cc6a59d2b9
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/id3v2.c

+ 4
- 1
libavformat/id3v2.c View File

@@ -422,7 +422,10 @@ static void read_comment(AVFormatContext *s, AVIOContext *pb, int taglen,
return;
}

if (dst && dst[0]) {
if (dst && !*dst)
av_freep(&dst);

if (dst) {
key = (const char *) dst;
dict_flags |= AV_DICT_DONT_STRDUP_KEY;
}


Loading…
Cancel
Save