[Live-devel] Destroying RTSPServer object crashes the whole application with SIGSEGV error

Ross Finlayson finlayson at live555.com
Sat Jun 27 11:51:09 PDT 2015


> I have a problem using Medium::close() in my destructor when deleting an RTSPServer object after I have already deleted ServerMediaSession* objects vector (of course, using Medium::close() too). 

First, make sure that you are using the latest version of the software (a bug related to deleting “RTSPServer”s was fixed in version 2015.06.24).

Second, be aware that once you have added a “ServerMediaSession” object to a “RTSPServer”, you must *not* delete the "ServerMediaSession” object by calling “Medium::close()”.  Instead, you must use “GenericMediaServer::deleteServerMediaSession()” (“GenericMediaServer” is the base class of “RTSPServer”), so that the RTSP server is told that the “ServerMediaSession” object is being deleted.

Finally, however, note that you don’t need to delete “ServerMediaSession” objects before you delete a “RTSPServer”, because the “RTSPServer” destructor will automatically delete any “ServerMediaSession” (and “ClientConnection” and “ClientSession”) objects that it manages.  Instead, you can just call “Medium::close()” on your “RTSPServer” object.

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150627/498ea52e/attachment.html>


More information about the live-devel mailing list