This fixes get_media_devices not seeing the video and the alsa input on
my bt878 card as associated devices.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
device += 13;
switch (bus) {
+ case MEDIA_BUS_PCI:
+ /* Remove the device function nr */
+ p = strrchr(device, '.');
+ if (!p)
+ continue;
+ *p = '\0';
+ break;
case MEDIA_BUS_USB:
/* Remove USB interface from the path */
p = strrchr(device, '/');
sprintf(virt_dev, "virtual%d", virtual++);
device = virt_dev;
break;
- default:
+ case MEDIA_BUS_UNKNOWN:
break;
}