From c828d8349c86f677dec9fdebaeb44e33bbc317ac Mon Sep 17 00:00:00 2001 From: alfrix Date: Mon, 12 Dec 2022 08:12:52 -0300 Subject: [PATCH] camera: fix for busters old libmpv fixes #840 --- panels/camera.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/panels/camera.py b/panels/camera.py index 837d7259..0919fa7f 100644 --- a/panels/camera.py +++ b/panels/camera.py @@ -49,11 +49,17 @@ class CameraPanel(ScreenPanel): self.mpv.terminate() self.mpv = None # Create mpv after show or the 'window' property will be None - self.mpv = mpv.MPV( - log_handler=self.log, - vo=self.vo, - profile='sw-fast', - ) + try: + self.mpv = mpv.MPV( + log_handler=self.log, + vo=self.vo, + profile='sw-fast', + ) + except ValueError: + self.mpv = mpv.MPV( + log_handler=self.log, + vo=self.vo, + ) # On wayland mpv cannot be embedded at least for now # https://github.com/mpv-player/mpv/issues/9654 # if fs or self.wayland: