• Cleanup unused ZRTP objects and thread. SIP media negotiation all initiates all possible media streams and sets up ZRTP objects/threads for them. If the other partner does not support a specific media, for example video, then make sure to cleanup ZRTP to avoid waiting threads and return ZRTP objects.
  • Reuse buffers as much as possible. Fix problems in AudioLevelEffect to reuse buffers and set offset correctly. Add code to reuse raw packets as much as possible. Reallocating packets if they contain buffers that are to small will lead to a set of buffers that are large enough and thus reallocation stops (stable condition).
  • Fix a thread blocking problem. First use notifyAll instead of just notify to wakeup other threads. Also use a timed wait as a workarounf of a (yet) unknown behaviour of synhcronized/notifyAll: sometimes the waiting thread is not notified and waits forever. Use a 100ms timed wait overcomes this problem. TODO: check and clarify this behaviour.