diff options
Diffstat (limited to 'ext/resindvd/resindvdbin.c')
-rw-r--r-- | ext/resindvd/resindvdbin.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c index 9fe091f2..81d511a0 100644 --- a/ext/resindvd/resindvdbin.c +++ b/ext/resindvd/resindvdbin.c @@ -191,7 +191,7 @@ rsn_dvdbin_uri_get_uri (GstURIHandler * handler) static gboolean rsn_dvdbin_uri_set_uri (GstURIHandler * handler, const gchar * uri) { - // RsnDvdBin *dvdbin = RESINDVDBIN (handler); + RsnDvdBin *dvdbin = RESINDVDBIN (handler); gboolean ret; gchar *protocol, *location; @@ -208,9 +208,14 @@ rsn_dvdbin_uri_set_uri (GstURIHandler * handler, const gchar * uri) location = gst_uri_get_location (uri); if (!location) return ret; + /* - * Parse out the device name + * URI structure: dvd:///path/to/device */ + if (g_str_has_prefix (uri, "dvd://")) { + g_free (dvdbin->device); + dvdbin->device = g_strdup (uri + 6); + } #if 0 /* * Parse out the new t/c/a and seek to them @@ -220,11 +225,6 @@ rsn_dvdbin_uri_set_uri (GstURIHandler * handler, const gchar * uri) gchar **strcur; gint pos = 0; - location = gst_uri_get_location (uri); - - if (!location) - return ret; - strcur = strs = g_strsplit (location, ",", 0); while (strcur && *strcur) { gint val; @@ -527,6 +527,7 @@ remove_elements (RsnDvdBin * dvdbin) DVDBIN_LOCK (dvdbin); if (dvdbin->pieces[i] != NULL) { GstElement *piece = dvdbin->pieces[i]; + dvdbin->pieces[i] = NULL; DVDBIN_UNLOCK (dvdbin); |