mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
tag: xmp: Remove extra chars from end of xmp packet
Windows picture viewer is unhappy with extra trailing chars at the end of the xmppacket footer. So remove them as they aren't needed.
This commit is contained in:
parent
dc79c42484
commit
96d2120c2b
2 changed files with 4 additions and 5 deletions
|
@ -1317,7 +1317,7 @@ gst_tag_list_from_xmp_buffer (const GstBuffer * buffer)
|
|||
if (*xp1 != '>')
|
||||
goto missing_header;
|
||||
|
||||
max_ft_len = 1 + strlen ("<?xpacket end=\".\"?>\n");
|
||||
max_ft_len = 1 + strlen ("<?xpacket end=\".\"?>");
|
||||
if (len < max_ft_len)
|
||||
goto missing_footer;
|
||||
|
||||
|
@ -1848,11 +1848,11 @@ gst_tag_list_to_xmp_buffer_full (const GstTagList * list, gboolean read_only,
|
|||
" " " " "\n");
|
||||
}
|
||||
}
|
||||
g_string_append_printf (data, "<?xpacket end=\"%c\"?>\n",
|
||||
g_string_append_printf (data, "<?xpacket end=\"%c\"?>",
|
||||
(read_only ? 'r' : 'w'));
|
||||
|
||||
buffer = gst_buffer_new ();
|
||||
GST_BUFFER_SIZE (buffer) = data->len + 1;
|
||||
GST_BUFFER_SIZE (buffer) = data->len;
|
||||
GST_BUFFER_DATA (buffer) = (guint8 *) g_string_free (data, FALSE);
|
||||
GST_BUFFER_MALLOCDATA (buffer) = GST_BUFFER_DATA (buffer);
|
||||
|
||||
|
|
|
@ -793,8 +793,7 @@ GST_START_TEST (test_xmp_parsing)
|
|||
"<?xpacket begin=\"\xEF\xBB\xBF\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>"
|
||||
"<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"GStreamer\">"
|
||||
"<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">";
|
||||
const gchar *xmp_footer =
|
||||
"</rdf:RDF>" "</x:xmpmeta>" "<?xpacket end=\"r\"?>\n";
|
||||
const gchar *xmp_footer = "</rdf:RDF>" "</x:xmpmeta>" "<?xpacket end=\"r\"?>";
|
||||
struct
|
||||
{
|
||||
const gchar *xmp_data;
|
||||
|
|
Loading…
Reference in a new issue