[Live-devel] is it a bug?
Zhixue Zhang
zhangzx at rcs-9000.com
Sat Feb 25 10:11:08 PST 2006
Dear Ross Finlayson,
In my rtspclient, my destruction function is as follow:
if( m_pMediaSession != NULL )
{
MediaSubsessionIterator iter(*m_pMediaSession);
MediaSubsession* subsession;
while ((subsession = iter.next()) != NULL)
{
m_pRTSPClient->teardownMediaSubsession(*subsession);
}
m_pRTSPClient->teardownMediaSession(*m_pMediaSession);
}
Medium::close(m_pSink);
Medium::close(m_pMediaSession);
Medium::close(m_pRTSPClient);
m_pEnv->reclaim();
delete m_pScheduler;
If rttsp server has died, in
RTSPClient::teardownMediaSubsession(MediaSubsession& subsession)
getResponse("TEARDOWN", bytesRead, responseCode, firstLine,
nextLineStart)) can not return. It will wait indefinitely, because in
RTSPClient::getResponse1there is not timeout in readSocket(envir(),
fInputSocketNum, &firstByte, 1, fromAddress).
Even if RTSPClient::getresponse() return, "delete[]
(char*)subsession.sessionId" and " subsession.sessionId = NULL" cannt
be executed for "break".
Maybe I am wrong somewhere, thanks for you advice.
-----ÓʼþÔ¼þ-----
·¢¼þÈË: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.
live555.com] ´ú±í Ross Finlayson
·¢ËÍʱ¼ä: 2006Äê2ÔÂ24ÈÕ 17:14
ÊÕ¼þÈË: LIVE555 Streaming Media - development & use
Ö÷Ìâ: Re: [Live-devel] is it a bug?
At 09:10 PM 2/23/2006, you wrote:
>If rtsp sever is terminated first.
>It seems that rtsp client can't teardownMediaSession(*session) and
>teardownMediaSubsession(*subsession).
>And rtspclient can't release its resources.
I'm not sure. If the server dies during the session, then client's
"sendRequest()" call for the RTSP "TEARDOWN" command will probably
fail, and then "teardownMediaSubsession()" will just return
False. Most clients, however, will probably just ignore that result,
and continue cleaning up as usual.
Ross Finlayson
Live Networks, Inc. (LIVE555.COM)
<http://www.live555.com/>
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
More information about the live-devel
mailing list