]> sjero.net Git - linphone/commitdiff
fix mis-use of update_call in linphonec.
authorSimon Morlat <simon.morlat@linphone.org>
Tue, 19 Mar 2013 11:19:01 +0000 (12:19 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Tue, 19 Mar 2013 11:19:01 +0000 (12:19 +0100)
console/commands.c
coreapi/linphonecore.c

index 22b09a5a6b92e89ec3feea40a9deb089197e9fea..67b2446f45ae806fa1ae969c7a172062aa62c27e 100644 (file)
@@ -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))
index 431d3e37c6c2cf4f02fc1f74dedb692c75409949..93d0b8b801925a8075c671e3d5e869f5c8365f26 100644 (file)
@@ -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);