[core] add orig session check

This commit is contained in:
Anthony Minessale 2018-12-11 20:10:02 +00:00 committed by Andrey Volk
parent 0072806df1
commit eaca798979
1 changed files with 7 additions and 0 deletions

View File

@ -10341,6 +10341,13 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
switch_core_session_get_partner(session, &orig_session);
if (orig_session) {
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_AUDIO,
switch_core_session_remote_media_flow(orig_session, SWITCH_MEDIA_TYPE_AUDIO), sdp_type);
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_VIDEO,
switch_core_session_remote_media_flow(orig_session, SWITCH_MEDIA_TYPE_VIDEO), sdp_type);
}
for (i = 0; i < smh->mparams->num_codecs; i++) {
const switch_codec_implementation_t *imp = smh->codecs[i];
switch_payload_t orig_pt = 0;