use a background thread for releasing exoplayer
This commit is contained in:
parent
c0e9e931c1
commit
393420ab2d
|
@ -456,8 +456,10 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
|
||||
private fun releaseExoPlayer() {
|
||||
mExoPlayer?.stop()
|
||||
mExoPlayer?.release()
|
||||
mExoPlayer = null
|
||||
Thread {
|
||||
mExoPlayer?.release()
|
||||
mExoPlayer = null
|
||||
}.start()
|
||||
}
|
||||
|
||||
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {
|
||||
|
|
Loading…
Reference in New Issue