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 27342d095..0cfeec9f5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -506,7 +506,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S } override fun onSurfaceTextureAvailable(surface: SurfaceTexture?, width: Int, height: Int) { - mExoPlayer?.setVideoSurface(Surface(mTextureView!!.surfaceTexture)) + Thread { + mExoPlayer?.setVideoSurface(Surface(mTextureView!!.surfaceTexture)) + }.start() } @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)