[Android] Fix playback from start of video

Geoffrey Métais git at videolan.org
Thu Dec 3 17:50:44 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec  3 17:02:17 2015 +0100| [b840bb28d239a2d097f0080a0601c1d4a04a316c] | committer: Geoffrey Métais

Fix playback from start of video

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b840bb28d239a2d097f0080a0601c1d4a04a316c
---

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

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 8862b46..6e2db08 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2860,6 +2860,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 // Consume fromStart option after first use to prevent
                 // restarting again when playback is paused.
                 intent.putExtra(PLAY_EXTRA_FROM_START, false);
+                if (fromStart)
+                    media.setTime(0l);
 
                 mLastAudioTrack = media.getAudioTrack();
                 mLastSpuTrack = media.getSpuTrack();



More information about the Android mailing list