Fix a bug uncovered by the test suite where the RTP payload number was not getting...
authorJoshua Colp <jcolp@digium.com>
Tue, 7 Aug 2012 17:47:52 +0000 (17:47 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 7 Aug 2012 17:47:52 +0000 (17:47 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370845 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/rtp_engine.c

index 46b75be..7907efb 100644 (file)
@@ -590,10 +590,12 @@ int ast_rtp_codecs_payloads_set_rtpmap_type_rate(struct ast_rtp_codecs *codecs,
                        if (!(type = ao2_alloc(sizeof(*type), NULL))) {
                                continue;
                        }
+                       type->rtp_code = pt;
                        ao2_link_flags(codecs->payloads, type, OBJ_NOLOCK);
                }
 
                *type = t->payload_type;
+               type->rtp_code = pt;
 
                if ((t->payload_type.format.id == AST_FORMAT_G726) && t->payload_type.asterisk_format && (options & AST_RTP_OPT_G726_NONSTANDARD)) {
                        ast_format_set(&type->format, AST_FORMAT_G726_AAL2, 0);