mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
only put session pointers in when its done from a codec that comes from a session and set it to the right one
This commit is contained in:
@@ -3037,6 +3037,9 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
|
||||
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_INCOMPATIBLE_DESTINATION);
|
||||
switch_goto_status(SWITCH_STATUS_FALSE, end);
|
||||
}
|
||||
|
||||
tech_pvt->read_codec.session = tech_pvt->session;
|
||||
|
||||
|
||||
if (switch_core_codec_init_with_bitrate(&tech_pvt->write_codec,
|
||||
tech_pvt->iananame,
|
||||
@@ -3052,6 +3055,8 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
|
||||
switch_goto_status(SWITCH_STATUS_FALSE, end);
|
||||
}
|
||||
|
||||
tech_pvt->write_codec.session = tech_pvt->session;
|
||||
|
||||
switch_channel_set_variable(tech_pvt->channel, "sip_use_codec_name", tech_pvt->iananame);
|
||||
switch_channel_set_variable(tech_pvt->channel, "sip_use_codec_fmtp", tech_pvt->rm_fmtp);
|
||||
switch_channel_set_variable_printf(tech_pvt->channel, "sip_use_codec_rate", "%d", tech_pvt->rm_rate);
|
||||
|
||||
Reference in New Issue
Block a user