Commit 43de256e authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fix crashes in Android when building SDK without video

parent 9ef94005
......@@ -58,12 +58,18 @@ MSWebCam * ms_web_cam_manager_get_cam(MSWebCamManager *m, const char *id){
}
MSWebCam * ms_web_cam_manager_get_default_cam(MSWebCamManager *m){
if (!m) {
return NULL;
}
if (m->cams!=NULL)
return (MSWebCam*)m->cams->data;
return NULL;
}
const MSList * ms_web_cam_manager_get_list(MSWebCamManager *m){
if (!m) {
return NULL;
}
return m->cams;
}
......
......@@ -272,18 +272,18 @@ void ms_factory_init_voip(MSFactory *obj){
ms_snd_card_manager_register_desc(cm,ms_snd_card_descs[i]);
}
#ifdef VIDEO_ENABLED
{
MSWebCamManager *wm;
wm=ms_web_cam_manager_new();
wm->factory = obj;
obj->wbcmanager = wm;
#ifdef VIDEO_ENABLED
ms_message("Registering all webcam handlers");
for (i=0;ms_web_cam_descs[i]!=NULL;i++){
ms_web_cam_manager_register_desc(wm,ms_web_cam_descs[i]);
}
}
#endif
}
#ifdef VIDEO_ENABLED
{
......
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