From: <sb...@us...> - 2007-11-02 16:32:13
|
Revision: 1260 http://iaxclient.svn.sourceforge.net/iaxclient/?rev=1260&view=rev Author: sbalea Date: 2007-11-02 09:32:05 -0700 (Fri, 02 Nov 2007) Log Message: ----------- Merge from trunk: make sure that encoders and decoders are properly destroyed upon iaxclient shutdown. Fix provided by Teri Schoech Modified Paths: -------------- branches/team/mihai/echocan/lib/iaxclient_lib.c Modified: branches/team/mihai/echocan/lib/iaxclient_lib.c =================================================================== --- branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-11-02 16:30:27 UTC (rev 1259) +++ branches/team/mihai/echocan/lib/iaxclient_lib.c 2007-11-02 16:32:05 UTC (rev 1260) @@ -672,7 +672,25 @@ video_destroy(); #endif } - + + /* destroy enocders and decoders for all existing calls */ + if ( calls ) + { + int i; + for ( i=0 ; i<max_calls ; i++ ) + { + if ( calls[i].encoder ) + calls[i].encoder->destroy(calls[i].encoder); + if ( calls[i].decoder ) + calls[i].decoder->destroy(calls[i].decoder); + if ( calls[i].vencoder ) + calls[i].vdecoder->destroy(calls[i].vencoder); + if ( calls[i].vdecoder ) + calls[i].vencoder->destroy(calls[i].vdecoder); + } + free(calls); + calls = NULL; + } put_iaxc_lock(); #ifdef WIN32 closesocket(iax_get_fd()); //fd: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |