<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Right Stationery</TITLE>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16443"></HEAD>
<BODY
style="BACKGROUND-COLOR: #e0e0e0; FONT-FAMILY: Arial; COLOR: #000000; FONT-SIZE: 10pt"
background="" bgColor=#e0e0e0>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012>Hi,</SPAN></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </DIV>
<DIV><SPAN class=469185413-30052012><FONT color=#005080 face="Trebuchet MS">I
have an application that streams audio from a microphone to other machines on
the network via RTSP. Users control the stream with a "Start" and "Stop"
button. When making the first "call" the quality is perfect (calls start
by clicking "start" and end by clicking "stop"). The second call has some
slight noise in it, and the third call is completely
rubbish.</FONT></SPAN></DIV>
<DIV><SPAN class=469185413-30052012><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV><SPAN class=469185413-30052012><FONT color=#005080 face="Trebuchet MS">I
have discovered that only the first stop actually stops the server from
streaming. The second call's stop, even though it calls the same function,
does not stop the server from streaming. I know this because my program
continuously hits a breakpoint in the AfterGettingFrame function of my
FramedFilter, even though the server is supposed to be
stopped.</FONT></SPAN></DIV>
<DIV><SPAN class=469185413-30052012><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV><SPAN class=469185413-30052012><FONT color=#005080 face="Trebuchet MS">My
stop function looks like this</FONT></SPAN></DIV>
<DIV><SPAN class=469185413-30052012><FONT color=#005080
face="Trebuchet MS"></FONT></SPAN> </DIV>
<DIV><SPAN class=469185413-30052012><FONT color=#005080
face="Trebuchet MS">//-------------------------------------------------</FONT></SPAN></DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#005080><SPAN
class=469185413-30052012> </SPAN> map<string,
COnDemandSubsession*>::iterator itr2;<BR> <SPAN
class=469185413-30052012> </SPAN>itr2 =
m_odsList.find(streamID);</FONT></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"> <SPAN
class=469185413-30052012> </SPAN>if (itr2 ==
m_odsList.end())<BR> <SPAN
class=469185413-30052012>
</SPAN>return false;</FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"> <SPAN
class=469185413-30052012>
</SPAN>m_odsList.erase(itr2);</FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </DIV>
<DIV><FONT face="Trebuchet MS"><FONT color=#005080><SPAN
class=469185413-30052012> </SPAN> map<string,
ServerMediaSession*>::iterator itr;<BR> <SPAN
class=469185413-30052012> </SPAN>itr =
m_smsList.find(streamID);</FONT></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"> if (itr ==
m_smsList.end())<BR> <SPAN
class=469185413-30052012> </SPAN>return false;</FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </DIV>
<DIV><FONT color=#005080
face="Trebuchet MS"> m_rtspServer->removeServerMediaSession((*itr).second);<BR> m_smsList.erase(itr);</FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012>//--------------------------------------------------</SPAN></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN class=469185413-30052012>The
first thing it does is look up the OnDemandSubsession for this stream by my
streamID, then I erase it from the list. After that I lookup the
ServerMediaSession based on the streamID, remove it from the RTSP server and
erase it from the list. This procedure works well for the first call's
stop, but it seems to fail for the second call's stop ( As I mentioned before, I
know this because my program still enters
AfterGettingFrame).</SPAN></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012>Could the problem be that I am not deleting the
OnDemandSubsession and ServerMediaSession? I tried that but then Live555
crashes in RTSPServer::RTSPCLientSession::reclaimStreamStates(), so I assumed
that those are deleted in Live555 and should not be deleted in my
code.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN class=469185413-30052012>Once
again I need some advice. Why does the server not actually stop on the
second call's stop? Thank you for all you assistance.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012>Regards.</SPAN></FONT></DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012></SPAN></FONT> </DIV>
<DIV><FONT color=#005080 face="Trebuchet MS"><SPAN
class=469185413-30052012></SPAN></FONT><FONT color=#005080
face="Trebuchet MS"><STRONG></STRONG></FONT> </DIV>
<DIV><STRONG><FONT color=#005080
face="Trebuchet MS"></FONT></STRONG> </DIV></BODY></HTML>