[FFmpeg-cvslog] id3v2: Do not export empty APIC description

wm4 git at videolan.org
Sun May 10 22:59:39 CEST 2015


ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Fri May  8 18:19:12 2015 +0200| [379e5603f4131e677ecf5ba79973dcd5603f28ea] | committer: Luca Barbato

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=379e5603f4131e677ecf5ba79973dcd5603f28ea
---

 libavformat/id3v2.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index b8994b2..799eafe 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);



More information about the ffmpeg-cvslog mailing list