Commit 890b0223 authored by DanmeiChen's avatar DanmeiChen
Browse files

notify callbacks later

parent 7a04f13f
......@@ -5249,8 +5249,10 @@ static void video_filter_callback(void *userdata, struct _MSFilter *f, unsigned
LinphoneCore *lc = (LinphoneCore *)userdata;
if (linphone_core_cbs_get_qrcode_found(linphone_core_get_current_callbacks(lc)) != NULL) {
char* result = ms_strdup((const char*)arg);
linphone_core_notify_qrcode_found(lc, result);
ms_free(result);
L_GET_CPP_PTR_FROM_C_OBJECT(lc)->doLater([lc, result]() {
linphone_core_notify_qrcode_found(lc, result);
ms_free(result);
});
}
break;
}
......
......@@ -498,7 +498,11 @@ void CallPrivate::onTmmbrReceived (const shared_ptr<CallSession> &session, int s
void CallPrivate::onSnapshotTaken(const shared_ptr<CallSession> &session, const char *file_path) {
L_Q();
linphone_call_notify_snapshot_taken(L_GET_C_BACK_PTR(q), file_path);
char* file = ms_strdup((const char*)file_path);
q->getCore()->doLater([q, file](){
linphone_call_notify_snapshot_taken(L_GET_C_BACK_PTR(q), file);
ms_free(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