From 3af9de93da4344089783142503d9f6e9c308c6b6 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 27 Aug 2019 16:06:07 +0200 Subject: Fix usage of abs() in Edi input --- src/input/Edi.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/input') 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 #include #include +#include #include #include #include @@ -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"; -- cgit v1.2.3