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