summaryrefslogtreecommitdiff
path: root/ext/resindvd/resindvdbin.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/resindvd/resindvdbin.c')
-rw-r--r--ext/resindvd/resindvdbin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c
index ac50fb14d..c96ff9446 100644
--- a/ext/resindvd/resindvdbin.c
+++ b/ext/resindvd/resindvdbin.c
@@ -230,7 +230,10 @@ rsn_dvdbin_uri_set_uri (GstURIHandler * handler, const gchar * uri)
*/
if (g_str_has_prefix (uri, "dvd://")) {
g_free (dvdbin->device);
- dvdbin->device = g_strdup (uri + 6);
+ if (strlen (uri) > 6)
+ dvdbin->device = g_strdup (uri + 6);
+ else
+ dvdbin->device = g_strdup (DEFAULT_DEVICE);
}
#if 0
/*