Skip to content

Commit

Permalink
fix: the decoding select logic
Browse files Browse the repository at this point in the history
fix the decoding select logic

Bug: https://pms.uniontech.com/bug-view-269827.html
Log: fix the decoding select logic
  • Loading branch information
add-uos authored and deepin-bot[bot] committed Sep 5, 2024
1 parent af9bee1 commit 9f9b84f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/backends/mpv/mpv_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 9f9b84f

Please sign in to comment.