[Live-devel] ServerMediaSubsession was called after destrcuted

Ross Finlayson finlayson at live555.com
Thu Dec 2 18:12:42 PST 2021



> On Dec 3, 2021, at 3:00 PM, yunus.lin 林韵 <yunus.lin at tanhai.net> wrote:
> 
> When I use RTSPServer to proxy RTSP stream from VLC( at computer ), it may be encounter fatal signal 11 (memeory error) at handleCmd_PLAY or handleCmd_TEARDOWN ( RTSPServer.cpp ).
> I found that the parameter "ServerMediaSubsession* subsession" is NULL, and "fStreamStates[i].subsession" is not NULL.
> The pointer "fStreamStates[i].subsession" was destructed before handleCmd_PLAY or handleCmd_TEARDOWN was called.
> 
> I call live555ProxyServer's "main" function in native, and it works well.
> 
> I don't know if it is the right way to use live555.  Does anyone have suggestions?

Because I don’t know what code you are using, I don’t know what you are doing wrong.  However, because our existing “LIVE555 Proxy Server” code (in “live555ProxyServer.cpp”) is working OK for you, you should use this code as a model for your own application.

Your problem appears to be that you are deleting LIVE555 objects in the wrong order.  In general, it is usually much simpler to exit your application by calling “exit()”, rather than by trying to delete LIVE555 objects and keeping the process alive.

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





More information about the live-devel mailing list