cdda:// broken with trailing slash
Newer GNOME/GLib, while sending audio CD URIs ie. "cdda://sr0/Track 01" seems to keep the trailing slash when asking to open the whole disk. For example, usine MATE under Debian Buster, and autostart with VLC as default application, VLC receives "cdda://sr0/" which does not work at all. I know that cdda is not standardised in any way, but you still have GNOME specific code in modules/access/cdda.c.
I've quickly hacked a change that works for me. Code is the same in Debian Buster's 3.0.10 and git master.
$ cat debian/patches/cdda-trailing-slash
--- vlc-3.0.10.orig/modules/access/cdda.c
+++ vlc-3.0.10/modules/access/cdda.c
@@ -77,10 +77,9 @@ static vcddev_t *DiscOpen(vlc_object_t *
const char *sl = strrchr(dec, '/');
if (sl != NULL)
{
- if (sscanf(sl, "/Track %2u", trackp) == 1)
- dec[sl - dec] = '\0';
- else
+ if (sscanf(sl, "/Track %2u", trackp) != 1)
*trackp = 0;
+ dec[sl - dec] = '\0';
}
if (unlikely(asprintf(&devpath, "/dev/%s", dec) == -1))
Not sure what you want to do here? You can commit my few lines change directly if you want.