mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
id3v2mux: Set image-description from the info struct, not the caps
This commit is contained in:
parent
2927805749
commit
d60ac3cfea
1 changed files with 10 additions and 2 deletions
|
@ -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 */
|
||||||
|
|
Loading…
Reference in a new issue