Skip to content

Commit

Permalink
Merge pull request #184 from Tencent/bugfix/android_destroy_inner
Browse files Browse the repository at this point in the history
bug: 解决偶现无法再次播放问题 close #180
  • Loading branch information
hexleo authored Dec 9, 2021
2 parents 4cb7191 + 042785c commit 040cc23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ class AudioPlayer(val player: AnimPlayer) {
}

fun destroy() {
needDestroy = true
if (isRunning) {
needDestroy = true
stop()
} else {
destroyInner()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,16 @@ class HardDecoder(player: AnimPlayer) : Decoder(player), SurfaceTexture.OnFrameA
}

override fun destroy() {
needDestroy = true
if (isRunning) {
needDestroy = true
stop()
} else {
destroyInner()
}
}

private fun destroyInner() {
ALog.i(TAG, "destroyInner")
renderThread.handler?.post {
player.pluginManager.onDestroy()
render?.destroyRender()
Expand Down

0 comments on commit 040cc23

Please sign in to comment.