Changeset 800


Ignore:
Timestamp:
Nov 14, 2006 1:35:20 PM (14 years ago)
Author:
bennylp
Message:

Fixed transport detachment when there's no thread being used in siprtp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/siprtp.c

    r784 r800  
    14431443    struct media_stream *audio = &app.call[call_index].media[0]; 
    14441444 
    1445     if (audio->thread) { 
    1446  
     1445    if (audio) { 
    14471446        audio->active = PJ_FALSE; 
    14481447 
    1449         audio->thread_quit_flag = 1; 
    1450         pj_thread_join(audio->thread); 
    1451         pj_thread_destroy(audio->thread); 
    1452         audio->thread = NULL; 
    1453         audio->thread_quit_flag = 0; 
    1454  
    1455         pjmedia_transport_detach(audio->transport, audio); 
     1448        if (audio->thread) { 
     1449            audio->thread_quit_flag = 1; 
     1450            pj_thread_join(audio->thread); 
     1451            pj_thread_destroy(audio->thread); 
     1452            audio->thread = NULL; 
     1453            audio->thread_quit_flag = 0; 
     1454        } 
     1455 
     1456        if (audio->transport) { 
     1457            pjmedia_transport_detach(audio->transport, audio); 
     1458            audio->transport = NULL; 
     1459        } 
    14561460    } 
    14571461} 
Note: See TracChangeset for help on using the changeset viewer.