mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
vcdsrc: minor clean-up
Use gst_uri_has_protocol().
This commit is contained in:
parent
9ab8959b30
commit
0b3f5bfed8
1 changed files with 2 additions and 10 deletions
|
@ -494,20 +494,14 @@ static gboolean
|
|||
gst_vcdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||
{
|
||||
GstVCDSrc *src = GST_VCDSRC (handler);
|
||||
gchar *protocol;
|
||||
gchar *location = NULL;
|
||||
gint tracknr;
|
||||
|
||||
GST_DEBUG_OBJECT (src, "setting uri '%s'", uri);
|
||||
|
||||
protocol = gst_uri_get_protocol (uri);
|
||||
|
||||
if (protocol == NULL || strcmp (protocol, "vcd"))
|
||||
if (!gst_uri_has_protocol (uri, "vcd"))
|
||||
goto wrong_protocol;
|
||||
|
||||
GST_DEBUG_OBJECT (src, "have protocol '%s'", protocol);
|
||||
g_free (protocol);
|
||||
|
||||
/* parse out the track in the location */
|
||||
if (!(location = gst_uri_get_location (uri)))
|
||||
goto no_location;
|
||||
|
@ -554,9 +548,7 @@ gst_vcdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
|||
/* ERRORS */
|
||||
wrong_protocol:
|
||||
{
|
||||
GST_ERROR_OBJECT (src, "wrong protocol %s specified",
|
||||
GST_STR_NULL (protocol));
|
||||
g_free (protocol);
|
||||
GST_ERROR_OBJECT (src, "wrong protocol, uri = %s", uri);
|
||||
return FALSE;
|
||||
}
|
||||
no_location:
|
||||
|
|
Loading…
Reference in a new issue