aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-05-07 23:56:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-08 01:07:13 +0200
commitb697b297b77f73c932307120e32c187d521d2ff7 (patch)
tree53312936bbf4d1ffdc7383520e7d864895cb4ac7
parent72e7553125e61847d9cab77fb7de62440dca746b (diff)
downloadffmpeg-b697b297b77f73c932307120e32c187d521d2ff7.tar.gz
id3v2: do not export APIC description if empty
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. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/id3v2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index a8273e282c..1c57dd9c43 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -1082,7 +1082,8 @@ 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);