--- gst/asfdemux/gstasfdemux.c.old	2009-11-18 09:47:06.000000000 +0100
+++ gst/asfdemux/gstasfdemux.c	2009-11-18 09:49:07.000000000 +0100
@@ -2202,7 +2202,7 @@ gst_asf_demux_get_gst_tag_from_tag_name 
     "WM/Year", GST_TAG_DATE}
     /* { "WM/Composer", GST_TAG_COMPOSER } */
   };
-  gsize out = strlen (name_utf8);
+  gsize out;
   guint i;
 
   if (name_utf8 == NULL) {
@@ -2210,6 +2210,8 @@ gst_asf_demux_get_gst_tag_from_tag_name 
     return NULL;
   }
 
+  out = strlen (name_utf8);
+
   for (i = 0; i < G_N_ELEMENTS (tags); ++i) {
     if (strncmp (tags[i].asf_name, name_utf8, out) == 0) {
       GST_LOG ("map tagname '%s' -> '%s'", name_utf8, tags[i].gst_name);
