mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +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)
|
gst_vcdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||||
{
|
{
|
||||||
GstVCDSrc *src = GST_VCDSRC (handler);
|
GstVCDSrc *src = GST_VCDSRC (handler);
|
||||||
gchar *protocol;
|
|
||||||
gchar *location = NULL;
|
gchar *location = NULL;
|
||||||
gint tracknr;
|
gint tracknr;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "setting uri '%s'", uri);
|
GST_DEBUG_OBJECT (src, "setting uri '%s'", uri);
|
||||||
|
|
||||||
protocol = gst_uri_get_protocol (uri);
|
if (!gst_uri_has_protocol (uri, "vcd"))
|
||||||
|
|
||||||
if (protocol == NULL || strcmp (protocol, "vcd"))
|
|
||||||
goto wrong_protocol;
|
goto wrong_protocol;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "have protocol '%s'", protocol);
|
|
||||||
g_free (protocol);
|
|
||||||
|
|
||||||
/* parse out the track in the location */
|
/* parse out the track in the location */
|
||||||
if (!(location = gst_uri_get_location (uri)))
|
if (!(location = gst_uri_get_location (uri)))
|
||||||
goto no_location;
|
goto no_location;
|
||||||
|
@ -554,9 +548,7 @@ gst_vcdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
wrong_protocol:
|
wrong_protocol:
|
||||||
{
|
{
|
||||||
GST_ERROR_OBJECT (src, "wrong protocol %s specified",
|
GST_ERROR_OBJECT (src, "wrong protocol, uri = %s", uri);
|
||||||
GST_STR_NULL (protocol));
|
|
||||||
g_free (protocol);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
no_location:
|
no_location:
|
||||||
|
|
Loading…
Reference in a new issue