From 7b77672794db55fb919c36f9a36efdc5bd38d6b6 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Wed, 22 May 2024 10:27:40 -0500 Subject: [PATCH] stream_lavf: don't add ffmpeg bluray or dvd protocols The naming of these conflict with existing mpv protocols, so skip if we get them. Users can still use them via lavf://bluray: or lavf://dvd: if they wish. --- stream/stream_lavf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stream/stream_lavf.c b/stream/stream_lavf.c index 30c823c58f..369f9cecc4 100644 --- a/stream/stream_lavf.c +++ b/stream/stream_lavf.c @@ -314,6 +314,10 @@ static char **get_unsafe_protocols(void) break; } } + // Skip to avoid name conflict with builtin mpv protocol. + if (strcmp(ffmpeg_protos[i], "bluray") == 0 || strcmp(ffmpeg_protos[i], "dvd") == 0) + continue; + if (!safe_protocol) MP_TARRAY_APPEND(NULL, protocols, num, talloc_strdup(protocols, ffmpeg_protos[i])); }