[vlc-commits] qt: add representation for invalid VLCTicks
Pierre Lamot
git at videolan.org
Thu Aug 29 10:44:39 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Aug 5 15:47:45 2019 +0200| [534594be801296ba9c08852057d1fdcfac347bf2] | committer: Jean-Baptiste Kempf
qt: add representation for invalid VLCTicks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=534594be801296ba9c08852057d1fdcfac347bf2
---
modules/gui/qt/util/vlctick.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/gui/qt/util/vlctick.cpp b/modules/gui/qt/util/vlctick.cpp
index 68f650d012..43667f18ac 100644
--- a/modules/gui/qt/util/vlctick.cpp
+++ b/modules/gui/qt/util/vlctick.cpp
@@ -40,6 +40,9 @@ bool VLCTick::valid() const
QString VLCTick::toString() const
{
+ if (m_ticks == VLC_TICK_INVALID)
+ return "--:--";
+
int64_t t_sec = SEC_FROM_VLC_TICK(m_ticks);
int sec = t_sec % 60;
int min = (t_sec / 60) % 60;
More information about the vlc-commits
mailing list