Commit a58e977f authored by Simon Morlat's avatar Simon Morlat

prevent double additions of webcam and soundcard descs

parent dd5ad1b7
......@@ -128,8 +128,10 @@ static void card_detect(MSSndCardManager *m, MSSndCardDesc *desc){
}
void ms_snd_card_manager_register_desc(MSSndCardManager *m, MSSndCardDesc *desc){
m->descs=ms_list_append(m->descs,desc);
card_detect(m,desc);
if (ms_list_find(m->descs, desc) == NULL){
m->descs=ms_list_append(m->descs,desc);
card_detect(m,desc);
}
}
void ms_snd_card_manager_reload(MSSndCardManager *m){
......
......@@ -89,8 +89,10 @@ static void cam_detect(MSWebCamManager *m, MSWebCamDesc *desc){
}
void ms_web_cam_manager_register_desc(MSWebCamManager *m, MSWebCamDesc *desc){
m->descs=ms_list_append(m->descs,desc);
cam_detect(m,desc);
if (ms_list_find(m->descs, desc) == NULL){
m->descs=ms_list_append(m->descs,desc);
cam_detect(m,desc);
}
}
void ms_web_cam_manager_reload(MSWebCamManager *m){
......
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