From d52182157301896ec98e38001bcf9747b08fe052 Mon Sep 17 00:00:00 2001 From: llyyr Date: Sun, 3 May 2026 07:54:46 +0530 Subject: [PATCH] demux_cue: fix audio file lookup inside subdirectory The FILE field in a CUE sheet may contain a relative path with subdirectories. It's not clear if this usecase is intended to be supported, as none of the usual CD/DVD ripping tool generates this type of FILE field in the CUE sheet. The specification is old and abandoned, so this will likely never be clarified and it doesn't cost much to support it so might as well... --- demux/demux_cue.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/demux/demux_cue.c b/demux/demux_cue.c index 6c869f1343..bfac627385 100644 --- a/demux/demux_cue.c +++ b/demux/demux_cue.c @@ -92,11 +92,10 @@ static bool open_source(struct timeline *tl, char *filename) struct bstr dirname = mp_dirname(tl->demuxer->filename); - struct bstr base_filename = bstr0(mp_basename(filename)); - if (!base_filename.len) { + if (!filename[0]) { MP_WARN(tl, "CUE: Invalid audio filename in .cue file!\n"); } else { - char *fullname = mp_path_join_bstr(ctx, dirname, base_filename); + char *fullname = mp_path_join_bstr(ctx, dirname, bstr0(filename)); if (try_open(tl, fullname)) { res = true; goto out;