From 653b7892d5f1d09caf9eeb4ed040012ced7af5cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 9 Aug 2010 19:20:04 +0300 Subject: [PATCH] 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. --- modules/services_discovery/udev.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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) -- 2.39.2