提交 6ea0b85e 编写于 作者: Z Zhang Rui

android/player: it's OK to set NULL surface before shutdown player

上级 b5bbc4ba
......@@ -322,9 +322,9 @@ IjkMediaPlayer_release(JNIEnv *env, jobject thiz)
if (!mp)
return;
ijkmp_android_set_surface(env, mp, NULL);
// explicit shutdown mp, in case it is not the last mp-ref here
ijkmp_shutdown(mp);
ijkmp_android_set_surface(env, mp, NULL);
//only delete weak_thiz at release
jobject weak_thiz = (jobject) ijkmp_set_weak_thiz(mp, NULL );
(*env)->DeleteGlobalRef(env, weak_thiz);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册