? ext/soup/libgstsouphttpsrc_la-gstsouphttpsrc.loT
Index: ext/soup/Makefile.am
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ext/soup/Makefile.am,v
retrieving revision 1.1
diff -u -p -r1.1 Makefile.am
--- ext/soup/Makefile.am	15 Nov 2007 17:26:25 -0000	1.1
+++ ext/soup/Makefile.am	11 Dec 2007 17:14:36 -0000
@@ -2,8 +2,8 @@ plugin_LTLIBRARIES = libgstsouphttpsrc.l
 
 libgstsouphttpsrc_la_SOURCES = gstsouphttpsrc.c
 
-libgstsouphttpsrc_la_CFLAGS = $(GST_CFLAGS) $(SOUP_CFLAGS) 
-libgstsouphttpsrc_la_LIBADD = $(GST_BASE_LIBS) $(SOUP_LIBS)
+libgstsouphttpsrc_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(SOUP_CFLAGS) 
+libgstsouphttpsrc_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-@GST_MAJORMINOR@ $(GST_BASE_LIBS) $(SOUP_LIBS)
 libgstsouphttpsrc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
 
 noinst_HEADERS = gstsouphttpsrc.h
Index: ext/soup/gstsouphttpsrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-bad/ext/soup/gstsouphttpsrc.c,v
retrieving revision 1.3
diff -u -p -r1.3 gstsouphttpsrc.c
--- ext/soup/gstsouphttpsrc.c	11 Dec 2007 16:39:39 -0000	1.3
+++ ext/soup/gstsouphttpsrc.c	11 Dec 2007 17:14:37 -0000
@@ -22,6 +22,8 @@
 #include <libsoup/soup.h>
 #include "gstsouphttpsrc.h"
 
+#include <gst/tag/tag.h>
+
 GST_DEBUG_CATEGORY_STATIC (souphttpsrc_debug);
 #define GST_CAT_DEFAULT souphttpsrc_debug
 
@@ -296,36 +298,14 @@ gst_souphttp_src_get_property (GObject *
   }
 }
 
-static char *
-unicodify (const char *str, int len, ...)
+static gchar *
+gst_souphttp_src_unicodify (const gchar * str)
 {
-  char *ret = NULL, *cset;
-  va_list args;
-  gsize bytes_read, bytes_written;
-
-  if (g_utf8_validate (str, len, NULL))
-    return g_strndup (str, len >= 0 ? len : strlen (str));
-
-  va_start (args, len);
-  while ((cset = va_arg (args, char *)) != NULL)
-  {
-    if (!strcmp (cset, "locale"))
-      ret = g_locale_to_utf8 (str, len, &bytes_read, &bytes_written, NULL);
-    else
-      ret = g_convert (str, len, "UTF-8", cset,
-          &bytes_read, &bytes_written, NULL);
-    if (ret)
-      break;
-  }
-  va_end (args);
-
-  return ret;
-}
+  const gchar *env_vars[] = { "GST_ICY_TAG_ENCODING",
+    "GST_TAG_ENCODING", NULL
+  };
 
-static char *
-gst_souphttp_src_unicodify (const char *str)
-{
-  return unicodify (str, -1, "locale", "ISO-8859-1", NULL);
+  return gst_tag_freeform_string_to_utf8 (str, -1, env_vars);
 }
 
 static GstFlowReturn
