Changeset 234


Ignore:
Timestamp:
Feb 26, 2006 9:21:26 PM (18 years ago)
Author:
bennylp
Message:

Fixed various crashes since mutex is introduced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/conference.c

    r229 r234  
    355355 
    356356 
    357 /* 
    358  * Suspend sound device 
    359  */ 
    360 static void suspend_sound( pjmedia_conf *conf ) 
    361 { 
    362     if (conf->snd_rec) 
    363         pj_snd_stream_stop(conf->snd_rec); 
    364     if (conf->snd_player) 
    365         pj_snd_stream_stop(conf->snd_player); 
    366 } 
    367  
    368  
    369357/** 
    370358 * Destroy conference bridge. 
     
    374362    PJ_ASSERT_RETURN(conf != NULL, PJ_EINVAL); 
    375363 
    376     suspend_sound(conf); 
     364    //suspend_sound(conf); 
    377365    destroy_sound(conf); 
    378366    pj_mutex_destroy(conf->mutex); 
     
    541529                  dst_port->name.ptr)); 
    542530 
    543         if (conf->connect_cnt == 0) { 
    544             suspend_sound(conf); 
    545             destroy_sound(conf); 
    546         } 
     531         
    547532    } 
    548533 
    549534    pj_mutex_unlock(conf->mutex); 
     535 
     536    if (conf->connect_cnt == 0) { 
     537        destroy_sound(conf); 
     538    } 
    550539 
    551540    return PJ_SUCCESS; 
     
    606595    --conf->port_cnt; 
    607596 
     597    pj_mutex_unlock(conf->mutex); 
     598 
     599 
    608600    /* Stop sound if there's no connection. */ 
    609601    if (conf->connect_cnt == 0) { 
    610602        destroy_sound(conf); 
    611603    } 
    612  
    613     pj_mutex_unlock(conf->mutex); 
    614604 
    615605    return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.