Skip to content

Commit

Permalink
Add check in siprtp sample app for inactive audio media (#3927)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored Apr 17, 2024
1 parent 12d0468 commit 72d885d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pjsip-apps/src/samples/siprtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,11 @@ static void call_on_media_update( pjsip_inv_session *inv,
pjmedia_sdp_neg_get_active_local(inv->neg, &local_sdp);
pjmedia_sdp_neg_get_active_remote(inv->neg, &remote_sdp);

if (local_sdp->media[0]->desc.port == 0) {
PJ_LOG(3, (THIS_FILE, "Audio media inactive"));
return;
}

status = pjmedia_stream_info_from_sdp(&audio->si, inv->pool, app.med_endpt,
local_sdp, remote_sdp, 0);
if (status != PJ_SUCCESS) {
Expand Down

0 comments on commit 72d885d

Please sign in to comment.