[Android] Benchmark: fix playback loop
Duncan McNamara
git at videolan.org
Tue Dec 1 12:07:13 CET 2020
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue Dec 1 10:35:34 2020 +0100| [98316971201e8af87f96993a61d26879f430a9cf] | committer: Nicolas Pomepuy
Benchmark: fix playback loop
If repeat type is ONE, playback will stay stuck in a loop.
To fix that, the repeat type is saved, then set to NONE, and at the end
reset to what it was for all benchmark tests that are not speed.
> https://code.videolan.org/videolan/vlc-android/commit/98316971201e8af87f96993a61d26879f430a9cf
---
.../src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt
index 2c6d5ae74..26d0c1eb7 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt
@@ -135,6 +135,9 @@ class BenchActivity : ShallowVideoPlayer() {
oldRate = service!!.rate
oldRepeating = service.playlistManager.repeating
service.playlistManager.setRepeatType(PlaybackStateCompat.REPEAT_MODE_ONE)
+ } else if (!isSpeed && this.service != null) {
+ oldRepeating = service!!.playlistManager.repeating
+ service.playlistManager.setRepeatType(PlaybackStateCompat.REPEAT_MODE_NONE)
}
}
@@ -537,6 +540,8 @@ class BenchActivity : ShallowVideoPlayer() {
}
if (isSpeed) {
service!!.setRate(oldRate, true)
+ } else {
+ service!!.playlistManager.setRepeatType(oldRepeating)
}
VLCInstance.restart()
}
More information about the Android
mailing list