mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2024-12-04 14:46:31 -05:00
Ciaran found this bug. We only ever set tv_usec, but for bitrates around
32 and lower, this will set tv_usec to > 1 second, which wrong. So we do it the right way, and put seconds in tv_sec. svn path=/trunk/timing/; revision=2507
This commit is contained in:
parent
f16bd5b8ad
commit
468052eec8
@ -36,8 +36,8 @@ void timing_sleep(uint64_t sleeptime)
|
||||
{
|
||||
struct timeval sleeper;
|
||||
|
||||
sleeper.tv_sec = 0;
|
||||
sleeper.tv_usec = sleeptime * 1000;
|
||||
sleeper.tv_sec = sleeptime / 1000;
|
||||
sleeper.tv_usec = (sleeptime % 1000) * 1000;
|
||||
|
||||
/* NOTE:
|
||||
* This should be 0 for the first argument. The linux manpage
|
||||
|
Loading…
Reference in New Issue
Block a user