From d44c2609e73c0a9f6030b62a6b39399bf1db1fd4 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 25 Nov 2023 09:46:29 +0100 Subject: Add --mpv-profile option, force libmpv (fixes custom system profile option) --- src/mpv.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mpv.cpp') diff --git a/src/mpv.cpp b/src/mpv.cpp index 6403bdc..0683ab2 100644 --- a/src/mpv.cpp +++ b/src/mpv.cpp @@ -64,7 +64,7 @@ Mpv::~Mpv() { destroy(); } -bool Mpv::create(bool use_system_mpv_config) { +bool Mpv::create(bool use_system_mpv_config, const char *profile) { if(created) return false; @@ -103,10 +103,11 @@ bool Mpv::create(bool use_system_mpv_config) { }; //mpv_set_option_string(mpv, "vd-lavc-dr", "yes"); - mpv_set_option_string(mpv, "vo", "libmpv"); mpv_set_option_string(mpv, "hwdec", "auto"); - mpv_set_option_string(mpv, "profile", "gpu-hq"); + mpv_set_option_string(mpv, "profile", profile); mpv_set_option_string(mpv, "gpu-api", "opengl"); + // This has to be set after mpv_set_option_string(... "profile") since that option overwrites this + mpv_set_option_string(mpv, "vo", "libmpv"); if(mpv_render_context_create(&mpv_gl, mpv, params) < 0) { fprintf(stderr, "Error: mpv_render_context_create failed\n"); -- cgit v1.2.3