[Speex-dev] Is it a bug?

keith keithy at hz.webex.com
Wed Dec 21 23:23:52 PST 2005


hi,Jean-Marc

 In jitter.c, the function speex_jitter_get has such code,
if (late_ratio_short > .1 || late_ratio_long > .03)
   {
      jitter->shortterm_margin[MAX_MARGIN-1] +=
jitter->shortterm_margin[MAX_MARGIN-2];
      jitter->longterm_margin[MAX_MARGIN-1] +=
jitter->longterm_margin[MAX_MARGIN-2];
      for (i=MAX_MARGIN-2;i>=0;i--)
      {
         jitter->shortterm_margin[i+1] = jitter->shortterm_margin[i];
         jitter->longterm_margin[i+1] = jitter->longterm_margin[i];
      }
      jitter->shortterm_margin[0] = 0;
      jitter->longterm_margin[0] = 0;
      /*fprintf (stderr, "interpolate frame\n");*/
      speex_decode_int(jitter->dec, NULL, out);
      if (current_timestamp)
         *current_timestamp = jitter->pointer_timestamp;
      return;
   }
   I think , for (i=MAX_MARGIN-2;i>=0;i--)  should be replaced by  for
(i=MAX_MARGIN-3;i>=0;i--) .
Best regards
keith






More information about the Speex-dev mailing list