[vlc-commits] qt: don't display position in progress bar if media is not seekable

Pierre Lamot git at videolan.org
Fri Jan 26 17:30:52 CET 2018


vlc/vlc-3.0 | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Jan 26 17:00:40 2018 +0100| [440b1820379270f89d5205d271db0f7c2632c015] | committer: Jean-Baptiste Kempf

qt: don't display position in progress bar if media is not seekable

Ref #19235

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit a49074832c5a65b707d3af4b3f2460f378bea335)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=440b1820379270f89d5205d271db0f7c2632c015
---

 modules/gui/qt/util/input_slider.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/util/input_slider.cpp b/modules/gui/qt/util/input_slider.cpp
index 741eb26c1a..f76a784617 100644
--- a/modules/gui/qt/util/input_slider.cpp
+++ b/modules/gui/qt/util/input_slider.cpp
@@ -201,14 +201,16 @@ void SeekSlider::setChapters( SeekPoints *chapters_ )
 void SeekSlider::setPosition( float pos, int64_t time, int length )
 {
     VLC_UNUSED(time);
-    if( pos == -1.0 )
+    if( pos == -1.0  || ! b_seekable )
     {
         setEnabled( false );
         mTimeTooltip->hide();
         isSliding = false;
+        setValue( 0 );
+        return;
     }
     else
-        setEnabled( b_seekable );
+        setEnabled( true );
 
     if( !isSliding )
     {



More information about the vlc-commits mailing list