Changeset 5124
- Timestamp:
- Jul 1, 2015 4:46:26 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5099 r5124 29 29 # define PJSUA_REQUIRE_CONSECUTIVE_RTCP_PORT 0 30 30 #endif 31 32 static void stop_media_stream(pjsua_call *call, unsigned med_idx); 31 33 32 34 static void pjsua_media_config_dup(pj_pool_t *pool, … … 1525 1527 1526 1528 1527 /* Clean up media transports in provisional media that is not used 1528 * by call media. 1529 /* If idx == 0, clean up media transports in provisional media that 1530 * is not used by call media, else clean up media transports starting 1531 * from index idx that have been removed by remote. 1529 1532 */ 1530 1533 static void media_prov_clean_up(pjsua_call_id call_id, int idx) … … 1533 1536 unsigned i; 1534 1537 1535 if ( call->med_prov_cnt > call->med_cnt) {1538 if (idx > 0 || call->med_prov_cnt > call->med_cnt) { 1536 1539 PJ_LOG(4,(THIS_FILE, "Call %d: cleaning up provisional media, " 1537 1540 "prov_med_cnt=%d, med_cnt=%d", 1538 call_id, call->med_prov_cnt, call->med_cnt)); 1541 call_id, (idx == 0? call->med_prov_cnt: idx), 1542 call->med_cnt)); 1539 1543 } 1540 1544 … … 1548 1552 1549 1553 for (j = 0; j < call->med_cnt; ++j) { 1550 if ( call->media[j].tp == call_med->tp) {1554 if (idx == 0 && call->media[j].tp == call_med->tp) { 1551 1555 used = PJ_TRUE; 1552 1556 break; … … 1986 1990 if (rem_sdp && mi >= rem_sdp->media_count) { 1987 1991 /* Remote might have removed some media lines. */ 1992 for (i = rem_sdp->media_count; i < call->med_prov_cnt; ++i) { 1993 stop_media_stream(call, i); 1994 } 1988 1995 media_prov_clean_up(call->index, rem_sdp->media_count); 1989 1996 call->med_prov_cnt = rem_sdp->media_count;
Note: See TracChangeset
for help on using the changeset viewer.