[Android] Properly release current renderer
Geoffrey Métais
git at videolan.org
Wed Mar 6 15:43:07 CET 2019
vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 6 11:27:27 2019 +0100| [3d3357987d1f504f53ba4082b316ee73943866b5] | committer: Geoffrey Métais
Properly release current renderer
(cherry picked from commit 87c19f9a5528035cee310b41b25c6a28f729f1d4)
> https://code.videolan.org/videolan/vlc-android/commit/3d3357987d1f504f53ba4082b316ee73943866b5
---
vlc-android/src/org/videolan/vlc/RendererDelegate.kt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/RendererDelegate.kt b/vlc-android/src/org/videolan/vlc/RendererDelegate.kt
index 798c5c56b..4df9f323f 100644
--- a/vlc-android/src/org/videolan/vlc/RendererDelegate.kt
+++ b/vlc-android/src/org/videolan/vlc/RendererDelegate.kt
@@ -55,7 +55,9 @@ object RendererDelegate : RendererDiscoverer.EventListener {
if (!started) return
started = false
for (discoverer in discoverers) discoverer.stop()
- if (isAppStarted()) PlaybackService.renderer.value = null
+ if (isAppStarted() || PlaybackService.service.value?.run { !isPlaying } != false) {
+ PlaybackService.renderer.value = null
+ }
clear()
}
More information about the Android
mailing list