- Timestamp:
- Feb 19, 2009 12:08:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/aps-direct/pjmedia/src/pjmedia-audiodev/audiodev.c
r2463 r2464 45 45 static struct aud_subsys 46 46 { 47 unsigned init_count; 47 48 pj_pool_factory *pf; 48 49 unsigned factory_cnt; … … 65 66 pj_status_t status = PJ_ENOMEM; 66 67 68 /* Allow init() to be called multiple times as long as there is matching 69 * number of shutdown(). 70 */ 71 if (aud_subsys.init_count++ != 0) { 72 return PJ_SUCCESS; 73 } 74 67 75 aud_subsys.pf = pf; 68 76 aud_subsys.factory_cnt = 0; … … 101 109 { 102 110 unsigned i; 111 112 /* Allow shutdown() to be called multiple times as long as there is matching 113 * number of init(). 114 */ 115 if (aud_subsys.init_count == 0) { 116 return PJ_SUCCESS; 117 } 118 --aud_subsys.init_count; 103 119 104 120 for (i=0; i<aud_subsys.factory_cnt; ++i) {
Note: See TracChangeset
for help on using the changeset viewer.