mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Re-fix sending unnegotiated payloads during a P2P RTP bridge.
The previous fix still would look in the static_RTP_PT table, which is inappropriate since we specifically want to find a codec that has been negotiated. (closes issue ASTERISK-20296) reported by NITESH BANSAL Patches: codec_negotiation.patch Uploaded by NITESH BANSAL (License #6418) ........ Merged revisions 372311 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -762,7 +762,21 @@ int ast_rtp_codecs_payload_code(struct ast_rtp_codecs *codecs, int asterisk_form
|
||||
|
||||
return res;
|
||||
}
|
||||
int ast_rtp_codecs_find_payload_code(struct ast_rtp_codecs *codecs, int code)
|
||||
{
|
||||
struct ast_rtp_payload_type *type;
|
||||
int res = -1;
|
||||
|
||||
/* Search the payload type in the codecs passed */
|
||||
if ((type = ao2_find(codecs->payloads, &code, OBJ_NOLOCK | OBJ_KEY)))
|
||||
{
|
||||
res = type->payload;
|
||||
ao2_ref(type, -1);
|
||||
return res;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
const char *ast_rtp_lookup_mime_subtype2(const int asterisk_format, struct ast_format *format, int code, enum ast_rtp_options options)
|
||||
{
|
||||
int i;
|
||||
|
Reference in New Issue
Block a user