mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
fdsrc: fix error setting when uri is invalid
Elements should always set the GError
This commit is contained in:
parent
ba31faf261
commit
7446cea73d
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue