From 675e2df96ab4a5e8f931582ae136a47a079d97c1 Mon Sep 17 00:00:00 2001 From: smorlat <smorlat@3f6dc0c8-ddfe-455d-9043-3cd528dc4637> Date: Tue, 1 Dec 2009 14:47:56 +0000 Subject: [PATCH] ignore unknown payloads. git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@777 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/oRTP/src/rtpsession.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/linphone/oRTP/src/rtpsession.c b/linphone/oRTP/src/rtpsession.c index a69557a955..2199217d85 100644 --- a/linphone/oRTP/src/rtpsession.c +++ b/linphone/oRTP/src/rtpsession.c @@ -595,8 +595,8 @@ rtp_session_set_ssrc (RtpSession * session, uint32_t ssrc) void rtp_session_update_payload_type(RtpSession *session, int paytype){ /* check if we support this payload type */ PayloadType *pt=rtp_profile_get_payload(session->rcv.profile,paytype); - session->hw_recv_pt=paytype; if (pt!=0){ + session->hw_recv_pt=paytype; ortp_message ("payload type changed to %i(%s) !", paytype,pt->mime_type); payload_type_changed(session,pt); @@ -921,8 +921,11 @@ extern void rtcp_parse(RtpSession *session, mblk_t *mp); static void payload_type_changed_notify(RtpSession *session, int paytype){ - session->rcv.pt = paytype; - rtp_signal_table_emit (&session->on_payload_type_changed); + PayloadType *pt = rtp_profile_get_payload(session->rcv.profile,paytype); + if (pt) { + session->rcv.pt = paytype; + rtp_signal_table_emit (&session->on_payload_type_changed); + } } -- GitLab