mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-24 00:58:32 +00:00
fix potential crash in linphone_call_enable_camera()
This commit is contained in:
parent
ba06368167
commit
b1663d2cc6
1 changed files with 2 additions and 1 deletions
|
|
@ -1100,7 +1100,8 @@ LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call){
|
||||||
**/
|
**/
|
||||||
void linphone_call_enable_camera (LinphoneCall *call, bool_t enable){
|
void linphone_call_enable_camera (LinphoneCall *call, bool_t enable){
|
||||||
#ifdef VIDEO_ENABLED
|
#ifdef VIDEO_ENABLED
|
||||||
if (call->videostream!=NULL && call->videostream->ms.ticker!=NULL){
|
if ((call->state==LinphoneCallStreamsRunning || call->state==LinphoneCallOutgoingEarlyMedia || call->state==LinphoneCallIncomingEarlyMedia)
|
||||||
|
&& call->videostream!=NULL ){
|
||||||
LinphoneCore *lc=call->core;
|
LinphoneCore *lc=call->core;
|
||||||
MSWebCam *nowebcam=get_nowebcam_device();
|
MSWebCam *nowebcam=get_nowebcam_device();
|
||||||
if (call->camera_enabled!=enable && lc->video_conf.device!=nowebcam){
|
if (call->camera_enabled!=enable && lc->video_conf.device!=nowebcam){
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue