summaryrefslogtreecommitdiffstats
path: root/src/zmq2edi
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-31 15:20:39 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-31 15:20:39 +0200
commit63219e29a5da0c1b723d2b511ab2554a1ddc756a (patch)
tree186e77ba62c50a0bfe0798baaa716b049f38cc63 /src/zmq2edi
parent42a7a704606027b3a61cbdb02c3055b96a620e68 (diff)
downloaddabmux-63219e29a5da0c1b723d2b511ab2554a1ddc756a.tar.gz
dabmux-63219e29a5da0c1b723d2b511ab2554a1ddc756a.tar.bz2
dabmux-63219e29a5da0c1b723d2b511ab2554a1ddc756a.zip
odr-zmq2edi fix subchannel index, FICF
Diffstat (limited to 'src/zmq2edi')
-rw-r--r--src/zmq2edi/zmq2edi.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/zmq2edi/zmq2edi.cpp b/src/zmq2edi/zmq2edi.cpp
index 5fd02e2..1597f87 100644
--- a/src/zmq2edi/zmq2edi.cpp
+++ b/src/zmq2edi/zmq2edi.cpp
@@ -241,8 +241,8 @@ static void send_eti_frame(uint8_t* p, metadata_t metadata)
etiLog.level(warn) << "Frame FCT=" << fct << " does not correspond to DLFC=" << metadata.dlfc;
}
-
bool ficf = (p[5] & 0x80) >> 7;
+ edi_tagDETI.ficf = ficf;
const int nst = p[5] & 0x7F;
@@ -267,6 +267,9 @@ static void send_eti_frame(uint8_t* p, metadata_t metadata)
std::vector<uint32_t> stl(nst);
// Loop over STC subchannels:
for (int i=0; i < nst; i++) {
+ // EDI stream index is 1-indexed
+ const int edi_stream_id = i + 1;
+
uint32_t scid = (p[8 + 4*i] & 0xFC) >> 2;
sad[i] = (p[8+4*i] & 0x03) * 256 + p[9+4*i];
uint32_t tpl = (p[10+4*i] & 0xFC) >> 2;
@@ -274,7 +277,7 @@ static void send_eti_frame(uint8_t* p, metadata_t metadata)
p[11+4*i];
edi::TagESTn tag_ESTn;
- tag_ESTn.id = i;
+ tag_ESTn.id = edi_stream_id;
tag_ESTn.scid = scid;
tag_ESTn.sad = sad[i];
tag_ESTn.tpl = tpl;