aboutsummaryrefslogtreecommitdiffstats
path: root/src/TimestampDecoder.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-24 09:43:50 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-01-24 09:43:50 +0100
commitecc9f35493ebdff9e98bf58a47328a8c2e7fac3e (patch)
treeba81080a0c787ba9bac606229353cd653a3b711a /src/TimestampDecoder.h
parenta2a8ed04fcf61f73e776c7ee2cfc44fb1fc5dbe6 (diff)
downloaddabmod-ecc9f35493ebdff9e98bf58a47328a8c2e7fac3e.tar.gz
dabmod-ecc9f35493ebdff9e98bf58a47328a8c2e7fac3e.tar.bz2
dabmod-ecc9f35493ebdff9e98bf58a47328a8c2e7fac3e.zip
Avoid conversion to float in frame_timestamp
Diffstat (limited to 'src/TimestampDecoder.h')
-rw-r--r--src/TimestampDecoder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h
index 6eedf9e..0411f1a 100644
--- a/src/TimestampDecoder.h
+++ b/src/TimestampDecoder.h
@@ -49,8 +49,8 @@ struct frame_timestamp
double offset_pps, offset_secs;
offset_pps = modf(diff, &offset_secs);
- this->timestamp_sec += lrintf(offset_secs);
- this->timestamp_pps += lrintf(offset_pps * 16384000.0);
+ this->timestamp_sec += lrint(offset_secs);
+ this->timestamp_pps += lrint(offset_pps * 16384000.0);
while (this->timestamp_pps >= 16384000) {
this->timestamp_pps -= 16384000;