summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-06-11 15:29:07 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-06-11 15:29:07 +0200
commit4b6590c5fa5b7a7a4cc5b62da4db21e9a1247b61 (patch)
treee870563b879e6ad4ab944dd2f373a60a8c33ecfc
parent5b35713111c38108f3560595a0a428836ec6e749 (diff)
downloaddabmux-4b6590c5fa5b7a7a4cc5b62da4db21e9a1247b61.tar.gz
dabmux-4b6590c5fa5b7a7a4cc5b62da4db21e9a1247b61.tar.bz2
dabmux-4b6590c5fa5b7a7a4cc5b62da4db21e9a1247b61.zip
Apply tist_offset to MNSC time too
-rw-r--r--src/DabMultiplexer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp
index c402d84..bd1c909 100644
--- a/src/DabMultiplexer.cpp
+++ b/src/DabMultiplexer.cpp
@@ -143,7 +143,11 @@ void DabMultiplexer::prepare(bool require_tai_clock)
}
mnsc_increment_time = false;
- mnsc_time = m_edi_time;
+
+ bool tist_enabled = m_pt.get("general.tist", false);
+ m_tist_offset = m_pt.get<int>("general.tist_offset", 0);
+
+ mnsc_time = m_edi_time + m_tist_offset;
etiLog.log(info, "Startup CIF Count %i with timestamp: %d + %f",
m_currentFrame, m_edi_time,
@@ -151,9 +155,6 @@ void DabMultiplexer::prepare(bool require_tai_clock)
// Try to load offset once
- bool tist_enabled = m_pt.get("general.tist", false);
- m_tist_offset = m_pt.get<int>("general.tist_offset", 0);
-
m_tai_clock_required = (tist_enabled and edi_conf.enabled()) or require_tai_clock;
if (m_tai_clock_required) {