[Android] Check media time if service time is 0

Geoffrey Métais git at videolan.org
Mon Jun 27 16:35:19 CEST 2016


vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jun 27 16:27:49 2016 +0200| [2c62bf76ec25146d11b72fccb8dbdb59e5f80dcd] | committer: Geoffrey Métais

Check media time if service time is 0

(cherry picked from commit 0d7f1165d1e15df491859e02f994cb18abe10b07)

> https://code.videolan.org/videolan/vlc-android/commit/2c62bf76ec25146d11b72fccb8dbdb59e5f80dcd
---

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

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 d1aefb6..0a6179c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2494,7 +2494,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 if (time > mForcedTime)
                     mLastTime = mForcedTime = -1;
             }
-        }
+        } else if (time == 0)
+            time = (int) mService.getCurrentMediaWrapper().getTime();
         return mForcedTime == -1 ? time : mForcedTime;
     }
 



More information about the Android mailing list