From 9f9b84fb8566eb609291f9a72a50c1c30e2676ee Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Wed, 4 Sep 2024 15:33:17 +0800 Subject: [PATCH] fix: the decoding select logic fix the decoding select logic Bug: https://pms.uniontech.com/bug-view-269827.html Log: fix the decoding select logic --- src/backends/mpv/mpv_proxy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backends/mpv/mpv_proxy.cpp b/src/backends/mpv/mpv_proxy.cpp index 546b3d6e..bd183d0d 100644 --- a/src/backends/mpv/mpv_proxy.cpp +++ b/src/backends/mpv/mpv_proxy.cpp @@ -462,7 +462,7 @@ mpv_handle *MpvProxy::mpv_init() m_sInitVo = "vaapi"; } - if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default")) { + if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default") && !QFile::exists("/dev/mtgpu.0")) { my_set_property(pHandle, "hwdec", "no"); my_set_property(pHandle, "vo", "x11"); my_set_property(pHandle, "video-sync", "desync"); @@ -528,7 +528,7 @@ mpv_handle *MpvProxy::mpv_init() } } #endif - if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default")) { + if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default") && !QFile::exists("/dev/mtgpu.0")) { my_set_property(pHandle, "hwdec", "no"); my_set_property(pHandle, "vo", "x11"); my_set_property(pHandle, "video-sync", "desync"); @@ -1334,7 +1334,7 @@ void MpvProxy::refreshDecode() my_set_property(m_handle, "hwdec", "vaapi"); } - if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default")) { + if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default") && !QFile::exists("/dev/mtgpu.0")) { my_set_property(m_handle, "hwdec", "no"); my_set_property(m_handle, "vo", "x11"); my_set_property(m_handle, "video-sync", "desync"); @@ -1397,7 +1397,7 @@ void MpvProxy::refreshDecode() my_set_property(m_handle, "hwdec", "vaapi"); } - if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default")) { + if (QFile::exists("/usr/local/ctyun/clink/Mirror/Registry/Default") && !QFile::exists("/dev/mtgpu.0")) { my_set_property(m_handle, "hwdec", "no"); my_set_property(m_handle, "vo", "x11"); my_set_property(m_handle, "video-sync", "desync");