summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-08-27 16:06:07 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-08-27 16:06:07 +0200
commit3af9de93da4344089783142503d9f6e9c308c6b6 (patch)
tree81057ec9cdf5bfec9086fca7f03353a4f69aff0a
parent0298076eea4f92685f9a01974261da41c2a01e5b (diff)
downloaddabmux-3af9de93da4344089783142503d9f6e9c308c6b6.tar.gz
dabmux-3af9de93da4344089783142503d9f6e9c308c6b6.tar.bz2
dabmux-3af9de93da4344089783142503d9f6e9c308c6b6.zip
Fix usage of abs() in Edi input
-rw-r--r--src/input/Edi.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input/Edi.cpp b/src/input/Edi.cpp
index 95fac53..6e0e683 100644
--- a/src/input/Edi.cpp
+++ b/src/input/Edi.cpp
@@ -31,6 +31,7 @@
#include <stdexcept>
#include <sstream>
#include <cstring>
+#include <cmath>
#include <cstdlib>
#include <cerrno>
#include <climits>
@@ -175,7 +176,7 @@ size_t Edi::readFrame(uint8_t *buffer, size_t size, uint32_t seconds, uint32_t t
double ts_req = (double)seconds + (tsta / 16384000.0);
- if (abs(ts_frame - ts_req) < 24e-3) {
+ if (std::abs(ts_frame - ts_req) < 24e-3) {
m_is_prebuffering = false;
etiLog.level(warn) << "EDI input " << m_name <<
" valid timestamp, pre-buffering complete";
@@ -230,7 +231,7 @@ size_t Edi::readFrame(uint8_t *buffer, size_t size, uint32_t seconds, uint32_t t
double ts_req = (double)seconds + (tsta / 16384000.0);
- if (abs(ts_frame - ts_req) > 24e-3) {
+ if (std::abs(ts_frame - ts_req) > 24e-3) {
m_is_prebuffering = true;
etiLog.level(warn) << "EDI input " << m_name <<
" timestamp out of bounds, re-enabling pre-buffering";