Fix video policy when auto-accept video is disabled

This commit is contained in:
Guillaume BIENKOWSKI 2014-07-16 16:43:36 +02:00
parent 6f86da2e8e
commit 845906bd55

View file

@ -1624,6 +1624,13 @@ static void audioRouteChangeListenerCallback (
}
linphone_call_params_enable_low_bandwidth(lcallParams, low_bandwidth);
}
// workaround for video policy not correctly updated for automatic accept
BOOL video = linphone_call_params_video_enabled(lcallParams);
const LinphoneVideoPolicy* policy = linphone_core_get_video_policy(theLinphoneCore);
video &= policy->automatically_accept;
linphone_call_params_enable_video(lcallParams, video);
linphone_core_accept_call_with_params(theLinphoneCore,call, lcallParams);
}