From 2ee7b2b94de4ae638fef65596e3c7da92eff831f Mon Sep 17 00:00:00 2001 From: Vineeth TM Date: Mon, 12 Oct 2015 11:15:15 +0900 Subject: [PATCH] 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 --- ext/soup/gstsouphttpclientsink.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/soup/gstsouphttpclientsink.c b/ext/soup/gstsouphttpclientsink.c index 9f1279e9ec..24e507e2e4 100644 --- a/ext/soup/gstsouphttpclientsink.c +++ b/ext/soup/gstsouphttpclientsink.c @@ -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);