<div dir="ltr"><div class="gmail_default" style><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">sorry about that copyright time, we should have updated. but my point is if utcTimes is "20141208T064100.000Z-\r\nSession: 81A6879B\r\n", then the sscanf will parse that not we want, please see the sample at the below. if you're pretty sure that live555-latest.tar.gz is right, then I'm so sorry for bothering you.</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">Range: clock=20141208T064100.000Z-</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">Session: 81A6879B</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">In this case:</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">int sscanfResult = sscanf(utcTimes, "%[^-]-%s", as, ae);<br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">when I printf sscanfResult which is actually "2"</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">when I printf as which is "20141208T064100.000Z"</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px">when I printf ae which is actually "Session:"</div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><pre></div><div class="gmail_default" style><div class="gmail_default" style><font color="#444444" face="courier new, monospace">kenchow@ubuntu:~/Documents$ cat sscanf.c</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">#include<stdio.h></font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">#include<string.h></font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><br></font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">int main()</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">{</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><span class="" style="white-space:pre">  </span>char *utcTimes = "20141208T064100.000Z-\r\nSession: 81A6879B";</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><span class="" style="white-space:pre">  </span>char as[50]={0}, ae[50]={0};</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><span class="" style="white-space:pre">      </span>int sscanfResult = sscanf(utcTimes, "%[^-]-%s", as, ae);</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><br></font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><span class="" style="white-space:pre">      </span>printf("%d\n", sscanfResult);</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><span class="" style="white-space:pre">   </span>printf("%s\n", as);</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><span class="" style="white-space:pre">     </span>printf("%s\n", ae);</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><br></font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><span class="" style="white-space:pre">   </span>return 0;</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">}</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><br></font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">kenchow@ubuntu:~/Documents$ ./sscanf </font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">2</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">20141208T064100.000Z</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">Session:</font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace">kenchow@ubuntu:~/Documents$ </font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"><br></font></div><div class="gmail_default" style><font color="#444444" face="courier new, monospace"></pre></font></div><div style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div><div class="gmail_default" style="color:rgb(68,68,68);font-family:'courier new',monospace;font-size:13px"><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><a href="http://about.me/kenchowcn" style="margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;color:rgb(58,169,233);text-decoration:none;line-height:18.200000762939453px" target="_blank"></a><a href="http://about.me/kenchowcn" style="margin:0px;padding:0px;border:0px;outline:0px;vertical-align:baseline;color:rgb(58,169,233);text-decoration:none" target="_blank"><table border="0" cellpadding="0" cellspacing="0" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;border-spacing:0px"><tbody style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:30px"> </td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td align="left" valign="top" style="padding:0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;color:rgb(51,51,51)">Ken Chow</div><div style="margin:3px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;color:rgb(43,130,173)">about.me/kenchowcn</div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td align="left" valign="top" style="padding:8px 0px 0px;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:top;line-height:1"><div style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;text-align:right;height:4px;background-color:rgb(197,208,224)"><img src="http://d13pix9kaak6wt.cloudfront.net/signature/colorbar.png" alt="Ken Chow on about.me" width="88" height="4" style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;float:right;display:block"></div></td></tr><tr style="margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td style="padding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseline;height:20px"> </td></tr></tbody></table></a></div></div></div>
<br><div class="gmail_quote">On Mon, Dec 8, 2014 at 10:19 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div><br></div><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)">Please see the attachment that I modified two files</div></div></blockquote><div><br></div></span>I’m puzzled that in both of the files that you attached, the copyright notice says<div><span style="white-space:pre-wrap">   </span>Copyright (c) 1996-2011</div><div>yet support for seeking by absolute time was added in 2012.  This suggests that you are using modified source files, rather than the unmodified, latest source files from <a href="http://www.live555.com/liveMedia/public" target="_blank">http://www.live555.com/liveMedia/public</a> - the only version of the code that we support.</div><div><br></div><div><br></div><div><span class=""><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)">From my client PLAY request like this:</div></div></blockquote></span>[…]<br><div><span class=""><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)">If the range like the above that I'v offered, the sscanf(utcTimes, "%[^-]-%s", as, ae) will have a problem.</div></div></blockquote><div><br></div></span>No it won’t have a problem.  In this case, the “sscanf()” call will return 1, which means that the code will set the variable “absStartTime”, but not the variable “absEndTime”, which means that “absEndTime” will be left at its default value of NULL - which means: No end time.</div><div><br></div><div>Note that your implementation of the</div><div><span style="white-space:pre-wrap">     </span>seekStreamSource(FramedSource* inputSource, char*& absStart, char*& absEnd)</div><div>virtual function (in your subclass of “OnDemandServerMediaSubsession”) needs to allow for the possibility of the “absEnd” parameter being NULL.</div><div><br></div><div><span class=""><br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)">Another thing:</div><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)"><br></div><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)">file: RTSPServer.cpp line: 2002 code:</div></div></blockquote></span>[…]<span class=""><br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)"><span style="white-space:pre-wrap"> </span>if (absStart != NULL) {  /******************line 2002***************************************************/</div></div></blockquote><div><br></div></span>No, that should be line 1951, not line 2002.  You are using an old (or modified) version of the code.  We do not support this!</div><div><br></div><div><br></div><div><span class=""><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace;font-size:small;color:rgb(68,68,68)">That if condition should have included  NULL != absEnd.</div></div></blockquote><div><br></div></span>No, the existing condition is correct.  Once again, your implementation of the “seekStreamSource()” virtual function needs to allow for the possibility of the “absEnd” parameter being NULL.</div></div><span class="HOEnZb"><font color="#888888"><br><br><div>
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></span></span>
</div>
<br></font></span></div><br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br></div>