From 50921f011097359a7fc773b379fca7c96e0ab44d Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Tue, 30 Apr 2024 09:04:54 +0800
Subject: [PATCH] fix build error of kylin video about mpv-0.35

---
 src/core/mpvcore.cpp | 52 ++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/core/mpvcore.cpp b/src/core/mpvcore.cpp
index cca57d7..4b861e5 100644
--- a/src/core/mpvcore.cpp
+++ b/src/core/mpvcore.cpp
@@ -1694,32 +1694,32 @@ bool MpvCore::event(QEvent *event)
 //                mpv_event_log_message *message = static_cast<mpv_event_log_message*>(event->data);
                 break;
             }
-            case MPV_EVENT_TRACK_SWITCHED:
-                KyInfo() << "[mpv event] MPV_EVENT_TRACK_SWITCHED";
-                // 轨道id改变
-                mpv_get_property(m_mpvHandle, "sid", MPV_FORMAT_INT64, &sid);
-                if (sid > m_stracks)
-                    sid = 0;
-
-                g_core_signal->notifySubId(sid);
-                if(sid != m_sid && sid >= 0)
-                {
-                    m_sid = sid;
-                    if (sid == 0) {
-                        ShowText(tr("subtitle : ").append("no"));
-                    }
-                    // 字幕改变
-                    for(Mpv::Track tck : m_fileInfo.stracks)
-                        if(tck.id == sid)
-                            ShowText(tr("subtitle : ").append(tck.title));
-                }
-                mpv_get_property(m_mpvHandle, "aid", MPV_FORMAT_INT64, &aid);
-                g_core_signal->notifyAudioId(aid);
-                mpv_get_property(m_mpvHandle, "vid", MPV_FORMAT_INT64, &vid);
-                g_core_signal->notifyVideoId(vid);
-                m_vid = vid;
-                m_aid = aid;
-                break;
+            //case MPV_EVENT_TRACK_SWITCHED:
+            //    KyInfo() << "[mpv event] MPV_EVENT_TRACK_SWITCHED";
+            //    // 轨道id改变
+            //    mpv_get_property(m_mpvHandle, "sid", MPV_FORMAT_INT64, &sid);
+            //    if (sid > m_stracks)
+            //        sid = 0;
+
+            //    g_core_signal->notifySubId(sid);
+            //    if(sid != m_sid && sid >= 0)
+            //    {
+            //        m_sid = sid;
+            //        if (sid == 0) {
+            //            ShowText(tr("subtitle : ").append("no"));
+            //        }
+            //        // 字幕改变
+            //        for(Mpv::Track tck : m_fileInfo.stracks)
+            //            if(tck.id == sid)
+            //                ShowText(tr("subtitle : ").append(tck.title));
+            //    }
+            //    mpv_get_property(m_mpvHandle, "aid", MPV_FORMAT_INT64, &aid);
+            //    g_core_signal->notifyAudioId(aid);
+            //    mpv_get_property(m_mpvHandle, "vid", MPV_FORMAT_INT64, &vid);
+            //    g_core_signal->notifyVideoId(vid);
+            //    m_vid = vid;
+            //    m_aid = aid;
+            //    break;
             default: // unhandled events
                 break;
             }
-- 
2.43.0

