diff --git a/gstreamer_player/src/com/hisharp/gstreamer_player/GstLibrary.kt b/gstreamer_player/src/com/hisharp/gstreamer_player/GstLibrary.kt index a67e252..eb6cdfc 100644 --- a/gstreamer_player/src/com/hisharp/gstreamer_player/GstLibrary.kt +++ b/gstreamer_player/src/com/hisharp/gstreamer_player/GstLibrary.kt @@ -32,7 +32,7 @@ class GstLibrary(context: Context) : Closeable, SurfaceHolder.Callback { } fun pause() { - //if (!isInit) return + if (!isInit) return nativePause() } @@ -46,6 +46,7 @@ class GstLibrary(context: Context) : Closeable, SurfaceHolder.Callback { } fun releaseSurface() { + if (!isInit) return isInit = false nativeSurfaceFinalize() }