Skip to content

Commit

Permalink
Fixed issue when using setting to use AVPF and receive AVP (pjsip#3729)
Browse files Browse the repository at this point in the history
  • Loading branch information
sauwming authored Oct 13, 2023
1 parent bd9db5f commit 5c5b328
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pjmedia/src/pjmedia/sdp_neg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1573,18 +1573,28 @@ static pj_status_t create_answer( pj_pool_t *pool,
const pjmedia_sdp_media *om; /* offer */
const pjmedia_sdp_media *im; /* initial media */
pjmedia_sdp_media *am = NULL; /* answer/result */
pj_uint32_t om_tp;
unsigned j;

om = offer->media[i];

om_tp = pjmedia_sdp_transport_get_proto(&om->desc.transport);
PJMEDIA_TP_PROTO_TRIM_FLAG(om_tp, PJMEDIA_TP_PROFILE_RTCP_FB);

/* Find media description in our initial capability that matches
* the media type and transport type of offer's media, has
* matching codec, and has not been used to answer other offer.
*/
for (im=NULL, j=0; j<initial->media_count; ++j) {
pj_uint32_t im_tp;

im = initial->media[j];

im_tp = pjmedia_sdp_transport_get_proto(&im->desc.transport);
PJMEDIA_TP_PROTO_TRIM_FLAG(im_tp, PJMEDIA_TP_PROFILE_RTCP_FB);

if (pj_strcmp(&om->desc.media, &im->desc.media)==0 &&
pj_strcmp(&om->desc.transport, &im->desc.transport)==0 &&
om_tp == im_tp &&
media_used[j] == 0)
{
pj_status_t status2;
Expand Down

0 comments on commit 5c5b328

Please sign in to comment.