mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
use a background thread for releasing exoplayer
This commit is contained in:
@@ -456,8 +456,10 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||||||
|
|
||||||
private fun releaseExoPlayer() {
|
private fun releaseExoPlayer() {
|
||||||
mExoPlayer?.stop()
|
mExoPlayer?.stop()
|
||||||
mExoPlayer?.release()
|
Thread {
|
||||||
mExoPlayer = null
|
mExoPlayer?.release()
|
||||||
|
mExoPlayer = null
|
||||||
|
}.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {
|
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {
|
||||||
|
Reference in New Issue
Block a user