[Asterisk-code-review] chan pjsip: fix switching sending codec when asymmetric rtp ... (asterisk[13])

Alexei Gradinari asteriskteam at digium.com
Tue Nov 15 15:04:26 CST 2016


Alexei Gradinari has uploaded a new change for review. ( https://gerrit.asterisk.org/4453 )

Change subject: chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no
......................................................................

chan_pjsip: fix switching sending codec when asymmetric_rtp_codec=no

The sending codec is switched to the receiving codec and then
is switched back to the best native codec on EVERY receiving RTP packets.
This is because after call of ast_channel_set_rawwriteformat there is call
of ast_set_write_format which calls set_format which sets rawwriteformat
to the best native format.

The patch removes call of ast_set_write_format which is not necessary.

ASTERISK-26603 #close

Change-Id: I5b7d098f8b254ce8f45546e6c36e5d324737f71d
---
M channels/chan_pjsip.c
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/53/4453/1

diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index cc4b2ef..1ffe0a2 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -738,7 +738,6 @@
 			ast_format_get_name(f->subclass.format), ast_channel_name(ast),
 			ast_format_get_name(ast_channel_rawwriteformat(ast)));
 		ast_channel_set_rawwriteformat(ast, f->subclass.format);
-		ast_set_write_format(ast, ast_channel_writeformat(ast));
 
 		if (ast_channel_is_bridged(ast)) {
 			ast_channel_set_unbridged_nolock(ast, 1);

-- 
To view, visit https://gerrit.asterisk.org/4453
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b7d098f8b254ce8f45546e6c36e5d324737f71d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>



More information about the asterisk-code-review mailing list