[vlc-devel] commit: udev: use V4L product ID instead of model ID ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Oct 15 21:49:37 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 15 22:45:24 2009 +0300| [13d1312dd49a5475f35b72706cef3fb282afc22d] | committer: Rémi Denis-Courmont 

udev: use V4L product ID instead of model ID

Product works for PCI as well, whereas model is only set for USB.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=13d1312dd49a5475f35b72706cef3fb282afc22d
---

 modules/services_discovery/udev.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 14c1703..c9299c2 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -225,7 +225,7 @@ static void HandleDevice (services_discovery_t *sd, struct udev_device *dev,
     const char *scheme = "v4l2"; /* FIXME: V4L v1 */
     const char *node = udev_device_get_devnode (dev);
     char *vnd = decode_property (dev, "ID_VENDOR_ENC");
-    char *name = decode_property (dev, "ID_MODEL_ENC");
+    const char *name = udev_device_get_property_value (dev, "ID_V4L_PRODUCT");
 
     char *mrl;
     if (asprintf (&mrl, "%s://%s", scheme, node) == -1)
@@ -238,7 +238,6 @@ static void HandleDevice (services_discovery_t *sd, struct udev_device *dev,
                                    name ? name : "Unnamed",
                                    0, NULL, 0, -1, ITEM_TYPE_CARD);
     msg_Dbg (sd, "adding %s", mrl);
-    free (name);
     free (mrl);
 
     if (item != NULL)




More information about the vlc-devel mailing list