0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-19 11:32:22 +02:00

TOOLS/gen-mpv-desktop.py: set --no-config when probing protocols

Apparently for an user mpv would crash on startup if built with asan and
mpv attemps to load mpv-mpris. Just set --no-config so we don't load
anything external since this is more correct anyway.
This commit is contained in:
llyyr 2024-09-15 23:00:42 +05:30 committed by Kacper Michajłow
parent e41ee0524c
commit c7dce6a838

View File

@ -31,7 +31,7 @@ if __name__ == "__main__":
if not mpv_desktop["X-KDE-Protocols"]:
raise ValueError("Missing X-KDE-Protocols entry in mpv.desktop file")
mpv_protocols = check_output([sys.argv[2], "--list-protocols"], encoding="UTF-8")
mpv_protocols = check_output([sys.argv[2], "--no-config", "--list-protocols"], encoding="UTF-8")
mpv_protocols = set(line.strip(" :/") for line in mpv_protocols.splitlines() if "://" in line)
if len(mpv_protocols) == 0:
raise ValueError("Unable to parse any protocols from mpv '--list-protocols'")