[Android] Do not seek before 0

Alexandre Perraud git at videolan.org
Fri Aug 10 16:42:35 CEST 2012


android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Fri Aug 10 16:21:36 2012 +0200| [695080a82d5ab6d64614498214610a7232a0383a] | committer: Jean-Baptiste Kempf

Do not seek before 0

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=695080a82d5ab6d64614498214610a7232a0383a
---

 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java       |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 22d3372..51d5456 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -752,8 +752,9 @@ public class VideoPlayerActivity extends Activity {
 
         @Override
         public void onSeek(int delta) {
-            long position = mLibVLC.getTime();
-            mLibVLC.setTime(position + delta);
+            long position = mLibVLC.getTime() + delta;
+            if (position < 0) position = 0;
+            mLibVLC.setTime(position);
             showOverlay();
         }
 



More information about the Android mailing list