[Live-devel] SubClassing "OnDemandServerMediaSubsession"

Ross Finlayson finlayson at live555.com
Wed Feb 13 09:14:26 PST 2013


> //try catch execute when stop message come and my code break here
> try
> 	{
> 		if(sms)
> 		{
> 			Medium::close(sms);
> 		}
> 
> 		rtspServer->deleteServerMediaSession(sms);
> }
> 	catch(...)
> 	{
> 			if(sms)
> 		{
> 			Medium::close(sms);
> 		}
> 			rtspServer->deleteServerMediaSession(sms);
> }
> 
> Can you please guide why my code is breaking.

It's because you are calling "Medium::close(sms);" as well as "rtspServer->deleteServerMediaSession(sms);".  You shouldn't do that!  You should only be calling
	rtspServer->deleteServerMediaSession(sms);
That will delete "sms" as well.


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/20130214/cd9522be/attachment-0001.html>


More information about the live-devel mailing list