summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-05-08 18:19:12 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-05-09 15:55:50 +0200
commit379e5603f4131e677ecf5ba79973dcd5603f28ea (patch)
tree6cc07e8f685b45168febfdb5c0c59e9bae475d82 /libavformat/id3v2.c
parentb9f7a677083647d85e583d6d7384938766a293d7 (diff)
id3v2: Do not export empty APIC description
APIC tags always have a description. Tag writers obviously leave it empty if there is no description. In this case, libavformat would export "" as title. Do not set the title instead.
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index b8994b2226..799eafee7c 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -763,7 +763,10 @@ int ff_id3v2_parse_apic(AVFormatContext *s, ID3v2ExtraMeta **extra_meta)
st->disposition |= AV_DISPOSITION_ATTACHED_PIC;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = apic->id;
- av_dict_set(&st->metadata, "title", apic->description, 0);
+
+ if (apic->description[0])
+ av_dict_set(&st->metadata, "title", apic->description, 0);
+
av_dict_set(&st->metadata, "comment", apic->type, 0);
av_init_packet(&st->attached_pic);