Changeset 4174 for pjproject


Ignore:
Timestamp:
Jun 21, 2012 8:09:53 AM (12 years ago)
Author:
bennylp
Message:

Fixed #1541: Crash in third party media sample application after library is restarted

Location:
pjproject/trunk/pjsip-apps/src/3rdparty_media_sample
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/3rdparty_media_sample/alt_pjsua_aud.c

    r3983 r4174  
    225225    const char *pkt = "Not RTP packet"; 
    226226 
    227     if (call_med->call->inv == NULL) { 
     227    if (!call_med->call || !call_med->call->inv || !call_med->tp) { 
    228228        /* Call has been disconnected. There is race condition here as 
    229229         * this cb may be called sometime after call has been disconnected */ 
     
    241241    const char *pkt = "Not RTCP packet"; 
    242242 
    243     if (call_med->call->inv == NULL) { 
     243    if (!call_med->call || !call_med->call->inv || !call_med->tp) { 
    244244        /* Call has been disconnected. There is race condition here as 
    245245         * this cb may be called sometime after call has been disconnected */ 
     
    302302} 
    303303 
     304void pjsua_check_snd_dev_idle() 
     305{ 
     306} 
    304307 
    305308/***************************************************************************** 
  • pjproject/trunk/pjsip-apps/src/3rdparty_media_sample/alt_pjsua_vid.c

    r3983 r4174  
    235235pj_status_t pjsua_vid_subsys_destroy(void) 
    236236{ 
     237    if (pjmedia_vid_codec_mgr_instance()) 
     238        pjmedia_vid_codec_mgr_destroy(NULL); 
     239 
     240    if (pjmedia_video_format_mgr_instance()) 
     241        pjmedia_video_format_mgr_destroy(NULL); 
     242 
    237243    /* 
    238244     * TODO: put your 3rd party library cleanup routine here 
     
    292298    const char *pkt = "Not RTP packet"; 
    293299 
    294     if (call_med->call->inv == NULL) { 
     300    if (!call_med->call || !call_med->call->inv || !call_med->tp) { 
    295301        /* Call has been disconnected. There is race condition here as 
    296302         * this cb may be called sometime after call has been disconnected */ 
     
    308314    const char *pkt = "Not RTCP packet"; 
    309315 
    310     if (call_med->call->inv == NULL) { 
     316    if (!call_med->call || !call_med->call->inv || !call_med->tp) { 
    311317        /* Call has been disconnected. There is race condition here as 
    312318         * this cb may be called sometime after call has been disconnected */ 
Note: See TracChangeset for help on using the changeset viewer.