From d60ac3cfeab561ddf1950012b351c4f2ec699e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 16 Dec 2013 16:14:52 +0100 Subject: [PATCH] id3v2mux: Set image-description from the info struct, not the caps --- ext/taglib/gstid3v2mux.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc index c345142c1b..677213037e 100644 --- a/ext/taglib/gstid3v2mux.cc +++ b/ext/taglib/gstid3v2mux.cc @@ -427,8 +427,14 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list, mime_type = gst_structure_get_name (s); if (mime_type != NULL) { ID3v2::AttachedPictureFrame * frame; - const gchar *desc; + const gchar *desc = NULL; 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) mime_type = "-->"; @@ -447,7 +453,9 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list, 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 : ""); /* FIXME set image type properly from caps */