gsturi: Remove unnecessary code
authorRavi Kiran K N <ravi.kiran@samsung.com>
Fri, 19 Sep 2014 04:12:10 +0000 (09:42 +0530)
committerLuis de Bethencourt <luis@debethencourt.com>
Fri, 19 Sep 2014 09:42:03 +0000 (10:42 +0100)
gst_uri_handler_set_uri() function has new_uri, location and colon
are not necessary, they can be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=736877

gst/gsturi.c

index eb8cdcc..a3ef6fd 100644 (file)
@@ -733,7 +733,7 @@ gst_uri_handler_set_uri (GstURIHandler * handler, const gchar * uri,
 {
   GstURIHandlerInterface *iface;
   gboolean ret;
-  gchar *new_uri, *protocol, *location, *colon;
+  gchar *protocol;
 
   g_return_val_if_fail (GST_IS_URI_HANDLER (handler), FALSE);
   g_return_val_if_fail (gst_uri_is_valid (uri), FALSE);
@@ -768,15 +768,8 @@ gst_uri_handler_set_uri (GstURIHandler * handler, const gchar * uri,
     }
   }
 
-  colon = strstr (uri, ":");
-  location = g_strdup (colon);
-
-  new_uri = g_strdup_printf ("%s%s", protocol, location);
-
   ret = iface->set_uri (handler, uri, error);
 
-  g_free (new_uri);
-  g_free (location);
   g_free (protocol);
 
   return ret;