]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
PJSIP: Remove premature write of raw formats
authorKinsey Moore <kmoore@digium.com>
Fri, 6 Jun 2014 19:08:42 +0000 (19:08 +0000)
committerKinsey Moore <kmoore@digium.com>
Fri, 6 Jun 2014 19:08:42 +0000 (19:08 +0000)
Currently, there are situations that can occur when using chan_pjsip
and certain dialplan applications (notably ChanSpy()) that can cause
the channel to get no audio with scrolling warnings about format
mismatches. This is caused by a failure to update translation paths on
a mid-call native format update since the raw formats have already
been updated by res_pjsip_sdp_rtp.c in set_caps(). Removing the
premature raw format updates allows the translation paths to be setup
correctly and the raw read and write formats with them.

AFS-63 #close

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@415342 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_pjsip_sdp_rtp.c

index 43f0832acfc1a14a5d1c1f52cc544a164b4fa95c..59fa647d9cf70dc26248bcb5934eda552d16f97d 100644 (file)
@@ -251,8 +251,6 @@ static int set_caps(struct ast_sip_session *session, struct ast_sip_session_medi
 
                /* Apply the new formats to the channel, potentially changing read/write formats while doing so */
                ast_format_cap_copy(ast_channel_nativeformats(session->channel), caps);
-               ast_format_copy(ast_channel_rawwriteformat(session->channel), &fmt);
-               ast_format_copy(ast_channel_rawreadformat(session->channel), &fmt);
                ast_set_read_format(session->channel, ast_channel_readformat(session->channel));
                ast_set_write_format(session->channel, ast_channel_writeformat(session->channel));
        }