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.
This commit is contained in:
Thiago Santos 2011-01-24 15:21:10 -03:00
parent 7faf92511a
commit 254088344c

View file

@ -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);