diff -u --recursive --new-file src/h323ep.cxx.orig src/h323ep.cxx
--- src/h323ep.cxx.orig	Sat Apr 23 00:10:15 2005
+++ src/h323ep.cxx	Wed Apr 27 02:11:46 2005
@@ -1593,6 +1593,7 @@
     connectionsToBeCleaned += adjustedToken;
     PTRACE(3, "H323\tOverwriting call " << newToken << ", renamed to " << adjustedToken);
   }
+  connectionsMutex.Signal();
 
   connection = CreateConnection(lastReference, userData, transport, NULL);
   if (connection == NULL) {
@@ -1603,6 +1604,7 @@
 
   connection->Lock();
 
+  connectionsMutex.Wait();
   connectionsActive.SetAt(newToken, connection);
 
   connectionsMutex.Signal();
diff -u --recursive --new-file src/h323neg.cxx.orig src/h323neg.cxx
--- src/h323neg.cxx.orig	Thu Jan 30 07:38:19 2003
+++ src/h323neg.cxx	Wed Apr 20 19:28:58 2005
@@ -343,6 +343,7 @@
 
 BOOL H245NegMasterSlaveDetermination::HandleIncoming(const H245_MasterSlaveDetermination & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived MasterSlaveDetermination: state=" << state);
@@ -401,6 +402,7 @@
 
 BOOL H245NegMasterSlaveDetermination::HandleAck(const H245_MasterSlaveDeterminationAck & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived MasterSlaveDeterminationAck: state=" << state);
@@ -439,6 +441,7 @@
 
 BOOL H245NegMasterSlaveDetermination::HandleReject(const H245_MasterSlaveDeterminationReject & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived MasterSlaveDeterminationReject: state=" << state);
@@ -468,6 +471,7 @@
 
 BOOL H245NegMasterSlaveDetermination::HandleRelease(const H245_MasterSlaveDeterminationRelease & /*pdu*/)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived MasterSlaveDeterminationRelease: state=" << state);
@@ -529,6 +533,7 @@
 
 BOOL H245NegTerminalCapabilitySet::Start(BOOL renegotiate, BOOL empty)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   if (state == e_InProgress) {
@@ -571,6 +576,7 @@
 
 BOOL H245NegTerminalCapabilitySet::HandleIncoming(const H245_TerminalCapabilitySet & pdu)
 {
+  replyTimer.Stop();
   mutex.Wait();
 
   PTRACE(3, "H245\tReceived TerminalCapabilitySet:"
@@ -612,6 +618,7 @@
 
 BOOL H245NegTerminalCapabilitySet::HandleAck(const H245_TerminalCapabilitySetAck & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived TerminalCapabilitySetAck:"
@@ -634,6 +641,7 @@
 
 BOOL H245NegTerminalCapabilitySet::HandleReject(const H245_TerminalCapabilitySetReject & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived TerminalCapabilitySetReject:"
@@ -656,6 +664,7 @@
 
 BOOL H245NegTerminalCapabilitySet::HandleRelease(const H245_TerminalCapabilitySetRelease & /*pdu*/)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived TerminalCapabilityRelease: state=" << state);
@@ -668,6 +677,7 @@
 
 void H245NegTerminalCapabilitySet::HandleTimeout(PTimer &, INT)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tTimeout on TerminalCapabilitySet: state=" << state);
@@ -892,6 +902,7 @@
 
 BOOL H245NegLogicalChannel::HandleOpenAck(const H245_OpenLogicalChannelAck & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived open channel ack: " << channelNumber << ", state=" << state);
@@ -929,6 +940,7 @@
 
 BOOL H245NegLogicalChannel::HandleOpenConfirm(const H245_OpenLogicalChannelConfirm & /*pdu*/)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived open channel confirm: " << channelNumber << ", state=" << state);
@@ -958,6 +970,7 @@
 
 BOOL H245NegLogicalChannel::HandleReject(const H245_OpenLogicalChannelReject & pdu)
 {
+  replyTimer.Stop();
   mutex.Wait();
 
   PTRACE(3, "H245\tReceived open channel reject: " << channelNumber << ", state=" << state);
@@ -992,6 +1005,7 @@
 
 BOOL H245NegLogicalChannel::HandleClose(const H245_CloseLogicalChannel & /*pdu*/)
 {
+  replyTimer.Stop();
   mutex.Wait();
 
   PTRACE(3, "H245\tReceived close channel: " << channelNumber << ", state=" << state);
@@ -1009,6 +1023,7 @@
 
 BOOL H245NegLogicalChannel::HandleCloseAck(const H245_CloseLogicalChannelAck & /*pdu*/)
 {
+  replyTimer.Stop();
   mutex.Wait();
 
   PTRACE(3, "H245\tReceived close channel ack: " << channelNumber << ", state=" << state);
@@ -1033,6 +1048,7 @@
 
 BOOL H245NegLogicalChannel::HandleRequestClose(const H245_RequestChannelClose & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived request close channel: " << channelNumber << ", state=" << state);
@@ -1067,6 +1083,7 @@
 
 BOOL H245NegLogicalChannel::HandleRequestCloseAck(const H245_RequestChannelCloseAck & /*pdu*/)
 {
+  replyTimer.Stop();
   mutex.Wait();
 
   PTRACE(3, "H245\tReceived request close ack channel: " << channelNumber << ", state=" << state);
@@ -1082,6 +1099,7 @@
 
 BOOL H245NegLogicalChannel::HandleRequestCloseReject(const H245_RequestChannelCloseReject & /*pdu*/)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived request close reject channel: " << channelNumber << ", state=" << state);
@@ -1096,6 +1114,7 @@
 
 BOOL H245NegLogicalChannel::HandleRequestCloseRelease(const H245_RequestChannelCloseRelease & /*pdu*/)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTRACE(3, "H245\tReceived request close release channel: " << channelNumber << ", state=" << state);
@@ -1499,6 +1518,7 @@
 
 BOOL H245NegRequestMode::HandleRequest(const H245_RequestMode & pdu)
 {
+  replyTimer.Stop();
   inSequenceNumber = pdu.m_sequenceNumber;
 
   PTRACE(3, "H245\tReceived request mode: inSeq=" << inSequenceNumber);
@@ -1528,6 +1548,7 @@
 
 BOOL H245NegRequestMode::HandleAck(const H245_RequestModeAck & pdu)
 {
+  replyTimer.Stop();
   PTRACE(3, "H245\tReceived ack on request mode: outSeq=" << outSequenceNumber
          << (awaitingResponse ? " awaitingResponse" : " idle"));
 
@@ -1542,6 +1563,7 @@
 
 BOOL H245NegRequestMode::HandleReject(const H245_RequestModeReject & pdu)
 {
+  replyTimer.Stop();
   PTRACE(3, "H245\tReceived reject on request mode: outSeq=" << outSequenceNumber
          << (awaitingResponse ? " awaitingResponse" : " idle"));
 
@@ -1557,6 +1579,7 @@
 
 BOOL H245NegRequestMode::HandleRelease(const H245_RequestModeRelease & /*pdu*/)
 {
+  replyTimer.Stop();
   PTRACE(3, "H245\tReceived release on request mode: inSeq=" << inSequenceNumber);
   return TRUE;
 }
@@ -1629,6 +1652,7 @@
 
 BOOL H245NegRoundTripDelay::HandleResponse(const H245_RoundTripDelayResponse & pdu)
 {
+  replyTimer.Stop();
   PWaitAndSignal wait(mutex);
 
   PTimeInterval tripEndTime = PTimer::Tick();
diff -u --recursive --new-file src/h323pluginmgr.cxx.orig src/h323pluginmgr.cxx
--- src/h323pluginmgr.cxx.orig	Wed Apr 27 23:19:46 2005
+++ src/h323pluginmgr.cxx	Wed Apr 27 23:35:31 2005
@@ -518,6 +518,10 @@
       // manually register the new singleton type, as we do not have a concrete type
       OpalMediaFormatFactory::Register(*this, this);
     }
+    ~OpalPluginMediaFormat()
+    {
+      OpalMediaFormatFactory::Unregister(*this);
+    }
     PluginCodec_Definition * encoderCodec;
 };
 
