From e83e4c6598ffc83fccd25eaafa621b683c630f07 Mon Sep 17 00:00:00 2001 From: Shaowen Yin Date: Sun, 21 Apr 2024 18:09:47 +0800 Subject: [PATCH] player: can't render video properly with libmpv(0.38) on Linux (#825) --- feeluown/player/mpvplayer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/feeluown/player/mpvplayer.py b/feeluown/player/mpvplayer.py index b1e4379b5b..9eebc3020a 100644 --- a/feeluown/player/mpvplayer.py +++ b/feeluown/player/mpvplayer.py @@ -45,12 +45,12 @@ def __init__(self, _=None, audio_device=b'auto', winid=None, mpvkwargs['wid'] = winid self._version = _mpv_client_api_version() - # old version libmpv can use opengl-cb - if self._version < (1, 107): - mpvkwargs['vo'] = 'opengl-cb' - self.use_opengl_cb = True - else: - self.use_opengl_cb = False + # From libmpv 0.38, libmpv is not the default vo. + # Note if vo is not set to libmpv, the video is rendered in mpv's + # native window instead of feeluown's mpvwidget (tested on KDE+wayland). + # On macOS, this option is optional. I believe the option is also required + # on Windows. + mpvkwargs['vo'] = 'libmpv' # set log_handler if you want to debug # mpvkwargs['log_handler'] = self.__log_handler