diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index 7ee976475..4942ea351 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -467,9 +467,11 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee } private fun releaseMediaPlayer() { - mMediaPlayer?.setSurface(null) - mMediaPlayer?.release() - mMediaPlayer = null + Thread { + mMediaPlayer?.setSurface(null) + mMediaPlayer?.release() + mMediaPlayer = null + }.start() } private fun videoPrepared(mediaPlayer: MediaPlayer) {