laforge
/
openbts-osmo
Archived
1
0
Fork 0

uhd: fix timestamp conversion bug on 32-bit architectures

Type size_t was used in the UHD time_spec_t to integer
conversion, which would overflow at roughly 4 and a half
hours causing the sample buffer to error on timestamp
validity. Builds where size_t takes on 64-bits were not
affected by this bug.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
This commit is contained in:
Thomas Tsou 2011-05-23 11:25:40 -07:00
parent 551dbd3326
commit de018f7fef
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ uhd::time_spec_t convert_time(TIMESTAMP ticks, double rate)
TIMESTAMP convert_time(uhd::time_spec_t ts, double rate)
{
size_t ticks = ts.get_full_secs() * rate;
TIMESTAMP ticks = ts.get_full_secs() * rate;
return ts.get_tick_count(rate) + ticks;
}

View File

@ -58,7 +58,7 @@ uhd::time_spec_t convert_time(TIMESTAMP ticks, double rate)
TIMESTAMP convert_time(uhd::time_spec_t ts, double rate)
{
size_t ticks = ts.get_full_secs() * rate;
TIMESTAMP ticks = ts.get_full_secs() * rate;
return ts.get_tick_count(rate) + ticks;
}