Commit 25408834 authored by Thiago Santos's avatar Thiago Santos
Browse files

tag: xmp: Move static variable to local function

Variable was being written to and could cause crashes
if multiple elements were parsing xmp at the same time.

Moving it to local scope solves the problem.
parent 7faf9251
......@@ -957,15 +957,6 @@ struct _GstXmpNamespaceMap
const gchar *original_ns;
gchar *gstreamer_ns;
};
static GstXmpNamespaceMap ns_map[] = {
{"dc", NULL},
{"exif", NULL},
{"tiff", NULL},
{"xap", NULL},
{"photoshop", NULL},
{"Iptc4xmpCore", NULL},
{NULL, NULL}
};
/* parsing */
......@@ -1153,6 +1144,16 @@ gst_tag_list_from_xmp_buffer (const GstBuffer * buffer)
XmpTag *last_xmp_tag = NULL;
GSList *pending_tags = NULL;
GstXmpNamespaceMap ns_map[] = {
{"dc", NULL},
{"exif", NULL},
{"tiff", NULL},
{"xap", NULL},
{"photoshop", NULL},
{"Iptc4xmpCore", NULL},
{NULL, NULL}
};
xmp_tags_initialize ();
g_return_val_if_fail (GST_IS_BUFFER (buffer), NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment