Fixed ticket #175: GSM codec factory does not shutdown properly causing it to fail on next pjsua_init (thanks Binu K S)

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1064 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
Benny Prijono 2007-03-15 10:12:57 +00:00
parent 0923717c82
commit d7036a133c
1 changed files with 4 additions and 0 deletions

View File

@ -190,11 +190,15 @@ PJ_DEF(pj_status_t) pjmedia_codec_gsm_deinit(void)
return PJ_SUCCESS;
/* We don't want to deinit if there's outstanding codec. */
/* This is silly, as we'll always have codec in the list if
we ever allocate a codec! A better behavior maybe is to
deallocate all codecs in the list.
pj_mutex_lock(gsm_codec_factory.mutex);
if (!pj_list_empty(&gsm_codec_factory.codec_list)) {
pj_mutex_unlock(gsm_codec_factory.mutex);
return PJ_EBUSY;
}
*/
/* Get the codec manager. */
codec_mgr = pjmedia_endpt_get_codec_mgr(gsm_codec_factory.endpt);