Fixed android video crash when rotating device

This commit is contained in:
Sylvain Berfini 2017-12-13 12:42:56 +01:00
parent 98e5be44d1
commit a7df6db770

View file

@ -481,7 +481,7 @@ void Java_org_linphone_core_CallImpl_setNativeVideoWindowId(JNIEnv *env, jobject
void Java_org_linphone_core_CoreImpl_setNativePreviewWindowId(JNIEnv *env, jobject thiz, jlong ptr, jobject id) {
LinphoneCore *cptr = (LinphoneCore*)ptr;
jobject oldWindow = (jobject) linphone_core_get_native_video_window_id(cptr);
jobject oldWindow = (jobject) linphone_core_get_native_preview_window_id(cptr);
if (oldWindow == id) {
ms_warning("Java_org_linphone_core_CoreImpl_setNativePreviewWindowId(): new id (%p) is the same as the current one, skipping...", id);
return;
@ -499,7 +499,7 @@ void Java_org_linphone_core_CoreImpl_setNativePreviewWindowId(JNIEnv *env, jobje
void Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(JNIEnv *env, jobject thiz, jlong ptr, jobject id) {
LinphoneCore *cptr = (LinphoneCore*)ptr;
jobject oldWindow = (jobject) linphone_core_get_native_preview_window_id(cptr);
jobject oldWindow = (jobject) linphone_core_get_native_video_window_id(cptr);
if (oldWindow == id) {
ms_warning("Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(): new id (%p) is the same as the current one, skipping...", id);
return;
@ -517,4 +517,4 @@ void Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(JNIEnv *env, jobject
#ifdef __cplusplus
}
#endif
#endif