fix crash because of payload types freed when receiving a new SDP (after early media for example), but media sessions are not restarted.

This commit is contained in:
Simon Morlat 2011-05-31 10:34:34 +02:00
parent 8bf1f2c14e
commit 4d7ab1c95d
3 changed files with 5 additions and 3 deletions

View file

@ -49,7 +49,9 @@ void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMedia
/* we already started media: check if we really need to restart it*/
if (oldmd){
if (!media_parameters_changed(call,oldmd,new_md) && !call->playing_ringbacktone){
sal_media_description_unref(oldmd);
/*as nothing has changed, keep the oldmd */
call->resultdesc=oldmd;
sal_media_description_unref(new_md);
if (call->all_muted){
ms_message("Early media finished, unmuting inputs...");
/*we were in early media, now we want to enable real media */

View file

@ -96,7 +96,7 @@ static MSList *match_payloads(const MSList *local, const MSList *remote, bool_t
Indeed despite we must sent with the remote numbering, we must be able to receive with
our local one.
*/
newp=payload_type_clone(matched);
newp=payload_type_clone(newp);
payload_type_set_number(newp,local_number);
res=ms_list_append(res,newp);
}

@ -1 +1 @@
Subproject commit 285b4e9c790f34a4cc1087af72425290c532c1df
Subproject commit 3c348bc98e990f0819b972a8b04d80da2d6d0d77