To whom it may concern, this is what worked for me: signal done flag Close RTCP Instances Close Sinks Close Sources Close RTSP Server Delete video and audio rtp and rtcp group socks Reclaim UsageEnvironment Delete Scheduler