Opened 8 years ago

Closed 8 years ago

#1987 closed defect (fixed)

Assertion in re-INVITE with PJSUA_CALL_REINIT_MEDIA

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.6
Component: pjsua-lib Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Scenario:

  1. Make call with default call flags where PJSUA_CALL_INCLUDE_DISABLED_MEDIA is set, so SDP offer contains 2 m= lines: audio and disabled video
  2. After call is established, initiate re-INVITE with call option flag set to only PJSUA_CALL_REINIT_MEDIA (PJSUA_CALL_INCLUDE_DISABLED_MEDIA is cleared). This time SDP offer also contains 2 m= lines: audio and disabled video.
  3. Assertion raised:
    Assertion failed: (call->med_prov_cnt >= local_sdp->media_count),
            function pjsua_media_channel_update, file ../src/pjsua-lib/pjsua_media.c, line 2857.
    
    with call->med_prov_cnt==1, call->med_cnt==2, local_sdp->media_count==2.

After investigation, we found that pjsua_media_channel_init() with PJSUA_CALL_REINIT_MEDIA causes call->med_prov_cnt==1 due to PJSUA_CALL_INCLUDE_DISABLED_MEDIA flag is not set, but pjmedia_sdp_neg_modify_local_offer2() adds a new m= line (i.e: disabled video from current active local SDP) to the SDP to maintain the media count (as mandated by standard). Eventually as call->med_prov_cnt is less than the number of m= line, assertion is raised.

Thanks Nadia Lapkovskaya for the report.

Change History (1)

comment:1 Changed 8 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed

In 5510:

Fixed #1987: Verify 'med_prov_cnt' after media reinitialization (with a new call setting) to make sure it is not decreased.

Note: See TracTickets for help on using tickets.