Ignore:
Timestamp:
Mar 2, 2015 3:04:19 AM (9 years ago)
Author:
nanang
Message:

Fixed #1816: Restart media transport on following forked media.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r4980 r4985  
    26912691                pjmedia_transport_info tp_info; 
    26922692                pjmedia_srtp_info *srtp_info; 
     2693 
     2694                if (call->inv->following_fork) { 
     2695                    /* Normally media transport will automatically restart 
     2696                     * itself (if needed, based on info from the SDP) in 
     2697                     * pjmedia_transport_media_start(), however in "following 
     2698                     * forked media" case (see #1644), we need to explicitly 
     2699                     * restart it as it cannot detect fork scenario from 
     2700                     * the SDP only. 
     2701                     */ 
     2702                    status = pjmedia_transport_media_stop(call_med->tp); 
     2703                    if (status != PJ_SUCCESS) { 
     2704                        PJ_PERROR(1,(THIS_FILE, status, 
     2705                                     "pjmedia_transport_media_stop() failed " 
     2706                                     "for call_id %d media %d", 
     2707                                     call_id, mi)); 
     2708                        continue; 
     2709                    } 
     2710                    status = pjmedia_transport_media_create(call_med->tp, 
     2711                                                            tmp_pool, 
     2712                                                            0, NULL, mi); 
     2713                    if (status != PJ_SUCCESS) { 
     2714                        PJ_PERROR(1,(THIS_FILE, status, 
     2715                                     "pjmedia_transport_media_create() failed " 
     2716                                     "for call_id %d media %d", 
     2717                                     call_id, mi)); 
     2718                        continue; 
     2719                    } 
     2720                } 
    26932721 
    26942722                /* Start/restart media transport based on info in SDP */ 
Note: See TracChangeset for help on using the changeset viewer.