From b0d2777e68864ceb79a23adc00952baba37e97f2 Mon Sep 17 00:00:00 2001 From: Fatih Uzunoglu Date: Wed, 19 Aug 2020 20:08:47 +0300 Subject: [PATCH] qt: don't let VLCTick::scale to cause decay into VLC_TICK_INVALID Signed-off-by: Pierre Lamot --- modules/gui/qt/util/vlctick.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gui/qt/util/vlctick.cpp b/modules/gui/qt/util/vlctick.cpp index ed7b0cec88..381bf9a715 100644 --- a/modules/gui/qt/util/vlctick.cpp +++ b/modules/gui/qt/util/vlctick.cpp @@ -61,7 +61,10 @@ QString VLCTick::toString() const VLCTick VLCTick::scale(float scalar) const { - return VLCTick(m_ticks*scalar); + if (scalar == 0.0f) + return VLCTick(VLC_TICK_0); // to not decay to VLC_TICK_INVALID + + return VLCTick(m_ticks * scalar); } int VLCTick::toSeconds() const