diff options
author | Vineeth TM <vineeth.tm@samsung.com> | 2015-10-12 11:15:15 +0900 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-10-12 16:53:28 +0300 |
commit | 2ee7b2b94de4ae638fef65596e3c7da92eff831f (patch) | |
tree | b091ecfed60edb2adc3083ef06aaae5553b2bc75 /ext/soup | |
parent | cece69003c2d0cc535fb1df1e3579cce68df3dcc (diff) |
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
Diffstat (limited to 'ext/soup')
-rw-r--r-- | ext/soup/gstsouphttpclientsink.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/soup/gstsouphttpclientsink.c b/ext/soup/gstsouphttpclientsink.c index 9f1279e9e..24e507e2e 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); |