From: RĂ©mi Denis-Courmont Date: Mon, 9 Aug 2010 16:20:04 +0000 (+0300) Subject: udev: fix disc device node encoding X-Git-Tag: 1.2.0-pre1~5512 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=653b7892d5f1d09caf9eeb4ed040012ced7af5cb;p=vlc udev: fix disc device node encoding Contrary to V4L2, the CDDA, DVD and BD plugins use the decoded file path. In practice, this was a very minor problem as device node paths normally only contain lower case ASCII, digits and the forward slash. --- diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c index 95b6b1a828..b7b7c7f078 100644 --- a/modules/services_discovery/udev.c +++ b/modules/services_discovery/udev.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -562,11 +563,7 @@ static char *disc_get_mrl (struct udev_device *dev) return NULL; val = udev_device_get_devnode (dev); - char *mrl; - - if (asprintf (&mrl, "%s://%s", scheme, val) == -1) - mrl = NULL; - return mrl; + return make_URI (val, scheme); } static char *disc_get_name (struct udev_device *dev)