diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-11-25 09:46:29 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-11-25 09:46:29 +0100 |
commit | d44c2609e73c0a9f6030b62a6b39399bf1db1fd4 (patch) | |
tree | 02f1fa95f52bfc103f51461ab6fdf8ac56a0c6bf /src/mpv.cpp | |
parent | 90e22e4415d6fabab09bc505a062f38b74f5f1a3 (diff) |
Add --mpv-profile option, force libmpv (fixes custom system profile option)
Diffstat (limited to 'src/mpv.cpp')
-rw-r--r-- | src/mpv.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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"); |