<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Arial",sans-serif;
color:windowtext;}
span.pl-smi
{mso-style-name:pl-smi;}
span.pl-c1
{mso-style-name:pl-c1;}
.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I have discovered a bug which causes our application to crash (boost lock terminate).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">We have an RTSP server with 2 subsessions (video+audio). If an RTSP client requests to stream just one subsession (SETUP called only on 1 track) [video or audio] the server will
crash.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I have debugged the source code and fixed by altering the following:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">In ‘RTSPServer.cpp’:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> Within the ‘</span><span style="font-size:9.0pt;font-family:Consolas;color:#8250DF;background:white">handleCmd_PLAY</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif">’
function the following checks ‘</span><span class="pl-smi"><span style="font-size:9.0pt;font-family:Consolas;background:white">fStreamStates</span></span><span style="font-size:9.0pt;font-family:Consolas;color:#1F2328;background:white">[i].</span><span class="pl-smi"><b><span style="font-size:9.0pt;font-family:Consolas;background:white">subsession</span></b></span><span style="font-size:9.0pt;font-family:Consolas;color:#1F2328;background:white">
!= </span><span class="pl-c1"><span style="font-size:9.0pt;font-family:Consolas;background:white">NULL</span></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif">’ needs to be ‘</span><span class="pl-smi"><span style="font-size:9.0pt;font-family:Consolas;background:white">fStreamStates</span></span><span style="font-size:9.0pt;font-family:Consolas;color:#1F2328;background:white">[i].</span><b><span style="font-size:9.0pt;font-family:Consolas;color:#24292F;background:white">streamToken</span></b><span style="font-size:9.0pt;font-family:Consolas;color:#1F2328;background:white">!=
</span><span class="pl-c1"><span style="font-size:9.0pt;font-family:Consolas;background:white">NULL</span></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif">’:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> // Do any required seeking/scaling on each subsession, before starting streaming.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> // (However, we don't do this if the "PLAY" request was for just a single subsession<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> // of a multiple-subsession stream; for such streams, seeking/scaling can be done<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> // only with an aggregate "PLAY".)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> for (i = 0; i < fNumStreamStates; ++i) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> if (subsession == NULL /* means: aggregated operation */ || fNumStreamStates == 1) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> if (<b>fStreamStates[i].subsession != NULL</b>) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> for (i = 0; i < fNumStreamStates; ++i) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> if (subsession == NULL /* means: aggregated operation */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> || subsession == fStreamStates[i].subsession) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> if (<b>fStreamStates[i].subsession == NULL</b>) continue;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> // Now, start streaming:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> for (i = 0; i < fNumStreamStates; ++i) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> if (subsession == NULL /* means: aggregated operation */<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> || subsession == fStreamStates[i].subsession) {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> unsigned short rtpSeqNum = 0;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> unsigned rtpTimestamp = 0;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> if (<b>fStreamStates[i].subsession == NULL</b>) continue;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">N.B I have omitted line numbers as my source might not be the absolute latest.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:9.5pt;color:black;mso-fareast-language:EN-GB">Thomas Collins MEng - Engineer<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:black;mso-fareast-language:EN-GB">Applied Science, Security Technologies</span><span style="font-size:9.5pt;color:black;mso-fareast-language:EN-GB"><br>
Tel: 01684 894972 | Mob: 07968 513075 | Email: </span><span style="mso-fareast-language:EN-GB"><a href="mailto:ticollins@qinetiq.com"><span style="font-size:9.5pt;color:blue">ticollins@qinetiq.com</span></a></span><span style="font-size:9.5pt;color:black;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:5.0pt;color:#1F497D;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;color:#1F497D;mso-fareast-language:EN-GB">Malvern Technology Centre WR14 3PS (CB A221)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:3.0pt;color:black;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#002744;mso-fareast-language:EN-GB"><img border="0" width="81" height="17" style="width:.8416in;height:.175in" id="Picture_x0020_1" src="cid:image001.png@01D972B7.EFEE6520" alt="logo.png"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:3.0pt;font-family:"Arial",sans-serif;color:#002744;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><a href="http://www.qinetiq.com/"><span style="font-size:9.5pt;color:blue">www.QinetiQ.com</span></a></span><span style="font-size:9.5pt;color:black;mso-fareast-language:EN-GB">
<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<FONT size=1 face=Arial>This email and any attachments to it may be
confidential and are intended solely for the use of the individual to whom it is
addressed. If you are not the intended recipient of this email, you must neither
take any action based upon its contents, nor copy or show it to anyone. Please
contact the sender if you believe you have received this email in error. QinetiQ
retains personal data relating to our customers and partners for the purposes of
conducting a business relationship, communicating and marketing to them as well
as to providing invitations to upcoming events. Please see our <A
href="https://www.qinetiq.com/Privacy-Policy">Privacy Notice</A> for
further information. In accordance with our Privacy Notice, you have the
right to withdraw your consent at any time. QinetiQ may monitor email traffic
data and also the content of email for the purposes of security. QinetiQ Limited
(Registered in England & Wales: Company Number: 3796233) Registered office:
Cody Technology Park, Ively Road, Farnborough, Hampshire, GU14 0LX </FONT><A
href="https://www.qinetiq.com"><FONT size=1
face=Arial>https://www.qinetiq.com</FONT></A><BR>
</body>
</html>