Hi Rhys,<br><br>I&#39;ve tried calling rtp_recv once with both 10ms and 1ms timeout times (as well as no timeout at all) and it looks like it doesn&#39;t make a difference. I also tried changing the system UDP buffer sizes to see if that had any effect, but it doesn&#39;t seem to.<br>

<br>--Andrew<br><br><div class="gmail_quote">2010/7/27 Rhys Hawkins <span dir="ltr">&lt;<a href="mailto:rhys.hawkins@anu.edu.au">rhys.hawkins@anu.edu.au</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div class="im">On Tue, 27 Jul 2010 14:12:37 -0400<br>
Andrew Ford &lt;<a href="mailto:andrew.ford@rit.edu">andrew.ford@rit.edu</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt;   timeout.tv_sec = 0;<br>
&gt;   timeout.tv_usec = 10000;<br>
&gt;   for (int i = 0; i &lt; 1000 &amp;&amp; rtp_recv(session, &amp;timeout, _timestamp); i ++) {<br>
&gt;<br>
&gt;<br>
&gt;     timeout.tv_sec = 0;<br>
&gt;     timeout.tv_usec = 10;<br>
&gt;<br>
&gt;   }<br>
&gt;<br>
<br>
</div>Hi Andrew,<br>
<br>
All that code is doing is a crude version of:<br>
<br>
  while (elapsed_time &lt; 10ms) {<br>
    process incoming packets<br>
  }<br>
<br>
You could try and replace the for loop with just one call to the rtp_recv<br>
function, ie:<br>
<div class="im"><br>
  timeout.tv_sec = 0;<br>
  timeout.tv_usec = 10000;<br>
</div><div class="im">  rtp_recv(session, &amp;timeout, _timestamp);<br>
<br>
</div>and see if that fixes your problem.<br>
<br>
The code above was to handle an issue with DV decoding in that decoding an<br>
entire frame of DV took a certain length of time and during that time the<br>
UDP buffer (kernel side) could overflow causing loss of data. I don&#39;t think<br>
it should be the cause of your problems, but things are pretty foggy that<br>
far back in time so it may have other ramifications I&#39;ve forgotten about.<br>
<br>
Cheers,<br>
<font color="#888888">    Rhys<br>
</font></blockquote></div><br>