summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <ts.santos@sisa.samsung.com>2014-07-07 16:14:32 -0300
committerThiago Santos <ts.santos@sisa.samsung.com>2014-07-07 16:14:55 -0300
commit7446cea73d28e23d99eb6335ca5ca4f976bf3b03 (patch)
tree872c9b507024d8c5caa7e1f1724001ca5204b492
parentba31faf261c5747808378c50818eef34712156d1 (diff)
fdsrc: fix error setting when uri is invalid
Elements should always set the GError
-rw-r--r--plugins/elements/gstfdsrc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c
index ec7cc35b9..82b834430 100644
--- a/plugins/elements/gstfdsrc.c
+++ b/plugins/elements/gstfdsrc.c
@@ -631,13 +631,18 @@ gst_fd_src_uri_set_uri (GstURIHandler * handler, const gchar * uri,
protocol = gst_uri_get_protocol (uri);
if (strcmp (protocol, "fd") != 0) {
+ g_set_error (err, GST_URI_ERROR, GST_URI_ERROR_BAD_URI,
+ "Wrong protocol for fdsrc in uri: '%s'", uri);
g_free (protocol);
return FALSE;
}
g_free (protocol);
- if (sscanf (uri, "fd://%d", &fd) != 1 || fd < 0)
+ if (sscanf (uri, "fd://%d", &fd) != 1 || fd < 0) {
+ g_set_error (err, GST_URI_ERROR, GST_URI_ERROR_BAD_URI,
+ "Bad file descriptor number in uri: '%s'", uri);
return FALSE;
+ }
if ((q = g_strstr_len (uri, -1, "?"))) {
gchar *sp;