Commit a7df6db7 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed android video crash when rotating device

parent 98e5be44
...@@ -481,7 +481,7 @@ void Java_org_linphone_core_CallImpl_setNativeVideoWindowId(JNIEnv *env, jobject ...@@ -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) { void Java_org_linphone_core_CoreImpl_setNativePreviewWindowId(JNIEnv *env, jobject thiz, jlong ptr, jobject id) {
LinphoneCore *cptr = (LinphoneCore*)ptr; 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) { if (oldWindow == id) {
ms_warning("Java_org_linphone_core_CoreImpl_setNativePreviewWindowId(): new id (%p) is the same as the current one, skipping...", id); ms_warning("Java_org_linphone_core_CoreImpl_setNativePreviewWindowId(): new id (%p) is the same as the current one, skipping...", id);
return; return;
...@@ -499,7 +499,7 @@ void Java_org_linphone_core_CoreImpl_setNativePreviewWindowId(JNIEnv *env, jobje ...@@ -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) { void Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(JNIEnv *env, jobject thiz, jlong ptr, jobject id) {
LinphoneCore *cptr = (LinphoneCore*)ptr; 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) { if (oldWindow == id) {
ms_warning("Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(): new id (%p) is the same as the current one, skipping...", id); ms_warning("Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(): new id (%p) is the same as the current one, skipping...", id);
return; return;
...@@ -517,4 +517,4 @@ void Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(JNIEnv *env, jobject ...@@ -517,4 +517,4 @@ void Java_org_linphone_core_CoreImpl_setNativeVideoWindowId(JNIEnv *env, jobject
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment