From: Simon Morlat Date: Tue, 19 Mar 2013 11:19:01 +0000 (+0100) Subject: fix mis-use of update_call in linphonec. X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=87de2d8391012ee540e56fae16c9d69ef14d347b fix mis-use of update_call in linphonec. --- diff --git a/console/commands.c b/console/commands.c index 22b09a5a..67b2446f 100644 --- a/console/commands.c +++ b/console/commands.c @@ -2510,13 +2510,15 @@ static int lpc_cmd_camera(LinphoneCore *lc, char *args){ const LinphoneCallParams *cp=linphone_call_get_current_params (call); if (args){ linphone_call_enable_camera(call,activated); - if ((activated && !linphone_call_params_video_enabled (cp))){ - /*update the call to add the video stream*/ - LinphoneCallParams *ncp=linphone_call_params_copy(cp); - linphone_call_params_enable_video(ncp,TRUE); - linphone_core_update_call(lc,call,ncp); - linphone_call_params_destroy (ncp); - linphonec_out("Trying to bring up video stream...\n"); + if (linphone_call_get_state(call)==LinphoneCallStreamsRunning){ + if ((activated && !linphone_call_params_video_enabled (cp))){ + /*update the call to add the video stream*/ + LinphoneCallParams *ncp=linphone_call_params_copy(cp); + linphone_call_params_enable_video(ncp,TRUE); + linphone_core_update_call(lc,call,ncp); + linphone_call_params_destroy (ncp); + linphonec_out("Trying to bring up video stream...\n"); + } } } if (linphone_call_camera_enabled (call)) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 431d3e37..93d0b8b8 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4711,7 +4711,7 @@ int linphone_core_get_device_rotation(LinphoneCore *lc ) { * **/ void linphone_core_set_device_rotation(LinphoneCore *lc, int rotation) { -ms_message("%s : rotation=%d\n", __FUNCTION__, rotation); + ms_message("%s : rotation=%d\n", __FUNCTION__, rotation); lc->device_rotation = rotation; #ifdef VIDEO_ENABLED LinphoneCall *call=linphone_core_get_current_call(lc);