diff options
author | Joshua Colp <jcolp@digium.com> | 2013-05-23 18:19:27 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2013-05-23 18:19:27 +0000 |
commit | 7f43acc49c7f10b266f75b76de2b1204b110b996 (patch) | |
tree | 965e17ef9fb07350efcf2bd0f3a642009066f86b /res/res_sip_sdp_rtp.c | |
parent | 9d742946dbef8e6bc50596ff80b871ac2e357bbf (diff) |
Fix a bug with applying the end result of the codec negotiation to the Asterisk channel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_sip_sdp_rtp.c')
-rw-r--r-- | res/res_sip_sdp_rtp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_sip_sdp_rtp.c b/res/res_sip_sdp_rtp.c index d0af479c7..a35752ad2 100644 --- a/res/res_sip_sdp_rtp.c +++ b/res/res_sip_sdp_rtp.c @@ -224,11 +224,11 @@ static int set_caps(struct ast_sip_session *session, struct ast_sip_session_medi if (session->channel) { ast_format_cap_copy(caps, ast_channel_nativeformats(session->channel)); ast_format_cap_remove_bytype(caps, media_type); - ast_format_cap_append(caps, joint); + ast_codec_choose(&session->endpoint->prefs, joint, 1, &fmt); + ast_format_cap_add(caps, &fmt); /* Apply the new formats to the channel, potentially changing read/write formats while doing so */ - ast_format_cap_append(ast_channel_nativeformats(session->channel), caps); - ast_codec_choose(&session->endpoint->prefs, caps, 0, &fmt); + 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)); |