id3v2mux: Set image-description from the info struct, not the caps

This commit is contained in:
Sebastian Dröge 2013-12-16 16:14:52 +01:00
parent 2927805749
commit d60ac3cfea

View file

@ -427,8 +427,14 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
mime_type = gst_structure_get_name (s); mime_type = gst_structure_get_name (s);
if (mime_type != NULL) { if (mime_type != NULL) {
ID3v2::AttachedPictureFrame * frame; ID3v2::AttachedPictureFrame * frame;
const gchar *desc; const gchar *desc = NULL;
GstMapInfo map; GstMapInfo map;
const GstStructure *info_struct;
info_struct = gst_sample_get_info (sample);
if (!info_struct
|| !gst_structure_has_name (info_struct, "GstTagImageInfo"))
info_struct = NULL;
if (strcmp (mime_type, "text/uri-list") == 0) if (strcmp (mime_type, "text/uri-list") == 0)
mime_type = "-->"; mime_type = "-->";
@ -447,7 +453,9 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
gst_buffer_unmap (image, &map); gst_buffer_unmap (image, &map);
desc = gst_structure_get_string (s, "image-description"); if (info_struct)
desc = gst_structure_get_string (info_struct, "image-description");
frame->setDescription ((desc) ? desc : ""); frame->setDescription ((desc) ? desc : "");
/* FIXME set image type properly from caps */ /* FIXME set image type properly from caps */