提交 071724c2 编写于 作者: Z Zhang Rui

android/MediaCodec: shutdown mp before set surface to NULL, to avoid...

android/MediaCodec: shutdown mp before set surface to NULL, to avoid unnecessary recreation of MediaCodec
上级 487512d5
......@@ -323,8 +323,8 @@ IjkMediaPlayer_release(JNIEnv *env, jobject thiz)
return;
// explicit shutdown mp, in case it is not the last mp-ref here
ijkmp_android_set_surface(env, mp, NULL );
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.
先完成此消息的编辑!
想要评论请 注册