summaryrefslogtreecommitdiff
path: root/res/res_rtp_asterisk.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2012-08-07 13:07:58 +0000
committerJoshua Colp <jcolp@digium.com>2012-08-07 13:07:58 +0000
commit15e41c7542fba77244ec709a76c49efdc74d450e (patch)
tree08a86fa9d8e990a70f46121e79ed348b44cc0a33 /res/res_rtp_asterisk.c
parent5c4578f4ad9af0d13638ec72a2bc141227ec8b3c (diff)
Reduce memory consumption significantly for users of the RTP engine API by storing only the payloads present and in use instead of every possible one.
Review: https://reviewboard.asterisk.org/r/2052/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r--res/res_rtp_asterisk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 97e63b48f..bdb4a251d 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2774,8 +2774,8 @@ static int bridge_p2p_rtp_write(struct ast_rtp_instance *instance, unsigned int
}
/* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */
- if (!(ast_rtp_instance_get_codecs(instance1)->payloads[bridged_payload].rtp_code) &&
- !(ast_rtp_instance_get_codecs(instance1)->payloads[bridged_payload].asterisk_format)) {
+ if (!ast_rtp_codecs_payload_code(ast_rtp_instance_get_codecs(instance1), 0, NULL, bridged_payload) &&
+ !ast_rtp_codecs_get_payload_format(ast_rtp_instance_get_codecs(instance1), bridged_payload)) {
return -1;
}