[Live-devel] scheduleNextQOSMeasurement() bug?

Skaarj NaPali skaarj1 at gmail.com
Sat Sep 7 05:09:59 PDT 2013


Hi Ross,

There is a problem with this line when "nextQOSMeasurementUSecs" <
"timeNowUSecs", or in other words when "timeNowUSecs" has been acquired at
a time after the time stored in "nextQOSMeasurementUSecs". This happened
for me only while single stepping the code in the debugger and thus letting
pass several seconds between the "gettimeofday" calls, but I guess that
could also happen under high system load, etc.

The effect is that the periodic QOS measurement practically "stops" working
because a very high value for "microseconds" will get passed to
"scheduleDelayedTask". When "usecsToDelay" gets negative due to above
mentioned condition, the "uint usecsToDelay" gets populated to the "int64_t
microseconds" parameter of "scheduleDelayedTask" without sign extension
(which is correct) and thus a very large delay is accounted for that task -
means in practice that it sort of stops working.

I fixed this with changing
  "unsigned usecsToDelay"
to
  "int usecsToDelay"
Kind regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130907/45156cb8/attachment.html>


More information about the live-devel mailing list