Skip to content

Commit

Permalink
SIP plugin: Save codec name on update request (meetecho#2417)
Browse files Browse the repository at this point in the history
Co-authored-by: ihusejnovic <[email protected]>
  • Loading branch information
2 people authored and PauKerr committed Nov 11, 2020
1 parent 5776a81 commit 493e75d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/janus_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -3835,6 +3835,16 @@ static void *janus_sip_handler(void *data) {
g_snprintf(error_cause, 512, "Error manipulating SDP");
goto error;
}
if(!offer) {
if(session->media.audio_pt_name == NULL && session->media.audio_pt > -1) {
session->media.audio_pt_name = janus_get_codec_from_pt(sdp, session->media.audio_pt);
JANUS_LOG(LOG_VERB, "Detected audio codec: %d (%s)\n", session->media.audio_pt, session->media.audio_pt_name);
}
if(session->media.video_pt_name == NULL && session->media.video_pt > -1) {
session->media.video_pt_name = janus_get_codec_from_pt(sdp, session->media.video_pt);
JANUS_LOG(LOG_VERB, "Detected video codec: %d (%s)\n", session->media.video_pt, session->media.video_pt_name);
}
}
/* Take note of the new SDP */
janus_sdp_destroy(session->sdp);
session->sdp = parsed_sdp;
Expand Down

0 comments on commit 493e75d

Please sign in to comment.