Merge pull request #573 from manupap1/rtsp_fix

Fix a bug when closing RTSP session over TCP
Fix memory leaks with rtsp and a bug