souphttpclientsink: Check if location being set is valid

Adding a check in set_property to find if the location uri is valid
and printing warning if not valid.

https://bugzilla.gnome.org/show_bug.cgi?id=755326
This commit is contained in:
Vineeth TM 2015-10-12 11:15:15 +09:00 committed by Sebastian Dröge
parent cece69003c
commit 2ee7b2b94d

View file

@ -295,6 +295,14 @@ gst_soup_http_client_sink_set_property (GObject * object, guint property_id,
g_free (souphttpsink->location);
souphttpsink->location = g_value_dup_string (value);
souphttpsink->offset = 0;
if ((souphttpsink->location == NULL)
|| !gst_uri_is_valid (souphttpsink->location)) {
GST_WARNING_OBJECT (souphttpsink,
"The location (\"%s\") set, is not a valid uri.",
souphttpsink->location);
g_free (souphttpsink->location);
souphttpsink->location = NULL;
}
break;
case PROP_USER_AGENT:
g_free (souphttpsink->user_agent);