mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
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:
parent
cece69003c
commit
2ee7b2b94d
1 changed files with 8 additions and 0 deletions
|
@ -295,6 +295,14 @@ gst_soup_http_client_sink_set_property (GObject * object, guint property_id,
|
||||||
g_free (souphttpsink->location);
|
g_free (souphttpsink->location);
|
||||||
souphttpsink->location = g_value_dup_string (value);
|
souphttpsink->location = g_value_dup_string (value);
|
||||||
souphttpsink->offset = 0;
|
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;
|
break;
|
||||||
case PROP_USER_AGENT:
|
case PROP_USER_AGENT:
|
||||||
g_free (souphttpsink->user_agent);
|
g_free (souphttpsink->user_agent);
|
||||||
|
|
Loading…
Reference in a new issue