automatic libsrt lazy initialization and shutting down