From 9d77e3fc14c6cc24c2e2c2163380f83dd756a716 Mon Sep 17 00:00:00 2001 From: oej Date: Tue, 27 Nov 2007 15:23:17 +0000 Subject: If we get a codec offer using a well-known payload type, but using it for another codec that we don't know, Asterisk did not remove that codec from the list. With this patch, we remove the codec from audio and video rtp objects and deny it ever existed. Thanks to lasse for testing. (closes issue #11376) Reported by: lasse Patches: bug11376.txt uploaded by oej (license 306) Tested by: lasse git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89630 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/rtp.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asterisk/rtp.h b/include/asterisk/rtp.h index cbcb6aae6..1ffa04d0d 100644 --- a/include/asterisk/rtp.h +++ b/include/asterisk/rtp.h @@ -170,8 +170,14 @@ void ast_rtp_pt_default(struct ast_rtp* rtp); /*! \brief Copy payload types between RTP structures */ void ast_rtp_pt_copy(struct ast_rtp *dest, struct ast_rtp *src); +/*! \brief Activate payload type */ void ast_rtp_set_m_type(struct ast_rtp* rtp, int pt); -void ast_rtp_set_rtpmap_type(struct ast_rtp* rtp, int pt, + +/*! \brief clear payload type */ +void ast_rtp_unset_m_type(struct ast_rtp* rtp, int pt); + +/*! \brief Initiate payload type to a known MIME media type for a codec */ +int ast_rtp_set_rtpmap_type(struct ast_rtp* rtp, int pt, char *mimeType, char *mimeSubtype, enum ast_rtp_options options); -- cgit v1.2.3