]> git.ipfire.org Git - thirdparty/asterisk.git/commit
rtp_engine.c: Fix performance issue with several channel drivers that use RTP. 08/1008/1
authorRichard Mudgett <rmudgett@digium.com>
Wed, 29 Jul 2015 18:49:47 +0000 (13:49 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 31 Jul 2015 01:34:24 +0000 (20:34 -0500)
commitaeeb170fc4fe4e681a96b87f8e81ade717aa2426
tree47d54a5a9301e3debc56520757c80a0473cbccde
parent84262749d2a1f59f669e801d5f796b016b223960
rtp_engine.c: Fix performance issue with several channel drivers that use RTP.

ast_rtp_codecs_get_payload() gets called once or twice for every received
RTP frame so it would be nice to not allocate an ao2 object to then have
it destroyed shortly thereafter.  The ao2 object gets allocated only if
the payload type is not set by the channel driver as a negotiated value.
The issue affects chan_skinny, chan_unistim, chan_rtp, and chan_ooh323.

* Made static_RTP_PT[] an array of ao2 objects that
ast_rtp_codecs_get_payload() can return instead of an array of structs
that must be copied into a created ao2 object.

ASTERISK-25296 #close
Reported by: Richard Mudgett

Change-Id: Icb6de5cd90bfae07d44403a1352963db9109dac0
main/rtp_engine.c