[Android] Do not reset speed when video is already loaded
Geoffrey Métais
git at videolan.org
Thu Sep 28 11:06:44 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Sep 28 11:06:19 2017 +0200| [7c350d15559002627f7ec518f80a65d7e19675a1] | committer: Geoffrey Métais
Do not reset speed when video is already loaded
> https://code.videolan.org/videolan/vlc-android/commit/7c350d15559002627f7ec518f80a65d7e19675a1
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 6 ++++--
1 file changed, 4 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 434f2bac5..8f510b5b7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -854,8 +854,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
initUI();
loadMedia();
- boolean ratePref = mSettings.getBoolean(PreferencesActivity.KEY_AUDIO_PLAYBACK_SPEED_PERSIST, true);
- mService.setRate(ratePref || mRateHasChanged ? mSettings.getFloat(PreferencesActivity.VIDEO_RATE, 1.0f) : 1.0F, false);
}
private void initPlaylistUi() {
@@ -3253,6 +3251,10 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
else
mService.loadUri(mUri);
+ if (!resumePlaylist ||!isPlaying || positionInPlaylist != mService.getCurrentMediaPosition()) {
+ final boolean ratePref = mSettings.getBoolean(PreferencesActivity.KEY_AUDIO_PLAYBACK_SPEED_PERSIST, true);
+ mService.setRate(ratePref || mRateHasChanged ? mSettings.getFloat(PreferencesActivity.VIDEO_RATE, 1.0f) : 1.0F, false);
+ }
// Get possible subtitles
getSubtitles();
More information about the Android
mailing list