From e3f7767e994036fb94434682d4666422eebe3aa5 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Wed, 2 Apr 2025 17:40:12 +0300
Subject: [PATCH 1/2] qt: initialize `m_highResolutionTime` in
 `PlayerControllerPrivate`

---
 modules/gui/qt/player/player_controller_p.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/player/player_controller_p.hpp b/modules/gui/qt/player/player_controller_p.hpp
index a54de92efb49..f7b4a02eea2b 100644
--- a/modules/gui/qt/player/player_controller_p.hpp
+++ b/modules/gui/qt/player/player_controller_p.hpp
@@ -103,7 +103,7 @@ public:
 #if QT_HAS_LIBATOMIC
     std::atomic<vlc_player_timer_smpte_timecode> m_highResolutionTime;
 #else
-    vlc_player_timer_smpte_timecode m_highResolutionTime;
+    vlc_player_timer_smpte_timecode m_highResolutionTime {};
     mutable QReadWriteLock m_highResolutionTimeLock;
 #endif
     mutable QPair<vlc_player_timer_smpte_timecode, QString> m_highResolutionTimeSample;
-- 
GitLab


From 7d2000b25b047347e2044df484d3874dee1ef1b5 Mon Sep 17 00:00:00 2001
From: Fatih Uzunoglu <fuzun54@outlook.com>
Date: Wed, 2 Apr 2025 17:41:04 +0300
Subject: [PATCH 2/2] qt: use `#ifdef` for `QT_HAS_LIBATOMIC` in
 `PlayerControllerPrivate`

Currently we don't account for `QT_HAS_LIBATOMIC` being `0`.
---
 modules/gui/qt/player/player_controller_p.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/player/player_controller_p.hpp b/modules/gui/qt/player/player_controller_p.hpp
index f7b4a02eea2b..8f7a17cf139a 100644
--- a/modules/gui/qt/player/player_controller_p.hpp
+++ b/modules/gui/qt/player/player_controller_p.hpp
@@ -100,7 +100,7 @@ public:
     double       m_position = 0.f;
     VLCTick      m_length= 0;
 
-#if QT_HAS_LIBATOMIC
+#ifdef QT_HAS_LIBATOMIC
     std::atomic<vlc_player_timer_smpte_timecode> m_highResolutionTime;
 #else
     vlc_player_timer_smpte_timecode m_highResolutionTime {};
-- 
GitLab