diff --git a/wechatsmallvideoview/src/main/java/com/example/wechatsmallvideoview/SurfaceVideoView.java b/wechatsmallvideoview/src/main/java/com/example/wechatsmallvideoview/SurfaceVideoView.java index 742c500..e86064e 100644 --- a/wechatsmallvideoview/src/main/java/com/example/wechatsmallvideoview/SurfaceVideoView.java +++ b/wechatsmallvideoview/src/main/java/com/example/wechatsmallvideoview/SurfaceVideoView.java @@ -312,6 +312,10 @@ public boolean isPlaying() { public void release() { mTargetState = STATE_RELEASED; mCurrentState = STATE_RELEASED; + try{ + mSurfaceHolder.removeCallback(this); + mSurfaceHolder = null; + }catch (Exception ignore){} if (mMediaPlayer != null) { try { mMediaPlayer.release();