diff --git a/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/AudioPlayer.kt b/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/AudioPlayer.kt index 1561660a..474c5647 100644 --- a/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/AudioPlayer.kt +++ b/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/AudioPlayer.kt @@ -180,8 +180,8 @@ class AudioPlayer(val player: AnimPlayer) { } fun destroy() { - needDestroy = true if (isRunning) { + needDestroy = true stop() } else { destroyInner() diff --git a/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/HardDecoder.kt b/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/HardDecoder.kt index 8f07ff7d..a9bd34cd 100644 --- a/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/HardDecoder.kt +++ b/Android/PlayerProj/animplayer/src/main/java/com/tencent/qgame/animplayer/HardDecoder.kt @@ -372,8 +372,8 @@ class HardDecoder(player: AnimPlayer) : Decoder(player), SurfaceTexture.OnFrameA } override fun destroy() { - needDestroy = true if (isRunning) { + needDestroy = true stop() } else { destroyInner() @@ -381,6 +381,7 @@ class HardDecoder(player: AnimPlayer) : Decoder(player), SurfaceTexture.OnFrameA } private fun destroyInner() { + ALog.i(TAG, "destroyInner") renderThread.handler?.post { player.pluginManager.onDestroy() render?.destroyRender()