]> sjero.net Git - linphone/commitdiff
workaround for stupid phone using "G729A" submime type.
authorSimon Morlat <simon.morlat@linphone.org>
Wed, 25 Aug 2010 12:26:23 +0000 (14:26 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Wed, 25 Aug 2010 12:26:23 +0000 (14:26 +0200)
coreapi/offeranswer.c

index efd44552de674d90c13c011cec046ec40c954b5a..22901242aabbdb6465859fb2eb97c138a0726f9b 100644 (file)
@@ -29,7 +29,10 @@ static PayloadType * find_payload_type_best_match(const MSList *l, const Payload
 
        for (elem=l;elem!=NULL;elem=elem->next){
                pt=(PayloadType*)elem->data;
-               if (strcasecmp(pt->mime_type,refpt->mime_type)==0 && pt->clock_rate==refpt->clock_rate){
+               /* the compare between G729 and G729A is for some stupid uncompliant phone*/
+               if (strcasecmp(pt->mime_type,refpt->mime_type)==0  ||
+                   ((strcasecmp(pt->mime_type, "G729") == 0 && strcasecmp(refpt->mime_type, "G729A") == 0 ))
+                       && pt->clock_rate==refpt->clock_rate){
                        candidate=pt;
                        /*good candidate, check fmtp for H264 */
                        if (strcasecmp(pt->mime_type,"H264")==0){