Commit 80a4d5bd authored by Simon Morlat's avatar Simon Morlat
Browse files

fix duplicated codecs and "Aide" menu

parent 37fc6aeb
......@@ -706,6 +706,17 @@ static MSList *add_missing_codecs(SalStreamType mtype, MSList *l){
return l;
}
static MSList *codec_append_if_new(MSList *l, PayloadType *pt){
MSList *elem;
for (elem=l;l!=NULL;l=elem->next){
PayloadType *ept=(PayloadType*)elem->data;
if (pt==ept)
return l;
}
l=ms_list_append(l,pt);
return l;
}
static void codecs_config_read(LinphoneCore *lc)
{
int i;
......@@ -716,7 +727,7 @@ static void codecs_config_read(LinphoneCore *lc)
if (pt){
if (!ms_filter_codec_supported(pt->mime_type)){
ms_warning("Codec %s is not supported by mediastreamer2, removed.",pt->mime_type);
}else audio_codecs=ms_list_append(audio_codecs,pt);
}else audio_codecs=codec_append_if_new(audio_codecs,pt);
}
}
audio_codecs=add_missing_codecs(SalAudio,audio_codecs);
......@@ -724,7 +735,7 @@ static void codecs_config_read(LinphoneCore *lc)
if (pt){
if (!ms_filter_codec_supported(pt->mime_type)){
ms_warning("Codec %s is not supported by mediastreamer2, removed.",pt->mime_type);
}else video_codecs=ms_list_append(video_codecs,(void *)pt);
}else video_codecs=codec_append_if_new(video_codecs,(void *)pt);
}
}
video_codecs=add_missing_codecs(SalVideo,video_codecs);
......
......@@ -176,7 +176,7 @@
<child>
<object class="GtkMenuItem" id="menuitem4">
<property name="visible">True</property>
<property name="label" translatable="yes">Aid_e</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu3">
......
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