aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 10:29:53 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 10:29:53 +0100
commitfb6ab762301d5da6b0eb3293d19cf545c4caf6ad (patch)
tree3c01491947b2352c3396f172976d8e354a26d00d
parent4797ac4355e0c2d9c23ae4fb1d60ac5751c8347c (diff)
downloaddabmux-fb6ab762301d5da6b0eb3293d19cf545c4caf6ad.tar.gz
dabmux-fb6ab762301d5da6b0eb3293d19cf545c4caf6ad.tar.bz2
dabmux-fb6ab762301d5da6b0eb3293d19cf545c4caf6ad.zip
Fix FIG0/24 for DAB+ services
-rw-r--r--src/fig/FIG0_24.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/fig/FIG0_24.cpp b/src/fig/FIG0_24.cpp
index 291b07b..c48d8de 100644
--- a/src/fig/FIG0_24.cpp
+++ b/src/fig/FIG0_24.cpp
@@ -146,13 +146,13 @@ FillStatus FIG0_24::fill(uint8_t *buf, size_t max_size)
break;
}
- if (type == subchannel_type_t::DABAudio) {
- auto fig0_2serviceAudio = (FIGtype0_24_audioservice*)buf;
+ if (isProgramme) {
+ auto fig0_24_audioservice = (FIGtype0_24_audioservice*)buf;
- fig0_2serviceAudio->SId = htons(serviceFIG0_24->service_id);
- fig0_2serviceAudio->rfa = 0;
- fig0_2serviceAudio->CAId = 0;
- fig0_2serviceAudio->Length = serviceFIG0_24->other_ensembles.size();
+ fig0_24_audioservice->SId = htons(serviceFIG0_24->service_id);
+ fig0_24_audioservice->rfa = 0;
+ fig0_24_audioservice->CAId = 0;
+ fig0_24_audioservice->Length = serviceFIG0_24->other_ensembles.size();
buf += 3;
fig0->Length += 3;
remaining -= 3;
@@ -161,12 +161,12 @@ FillStatus FIG0_24::fill(uint8_t *buf, size_t max_size)
serviceFIG0_24->service_id);
}
else {
- auto fig0_2serviceData = (FIGtype0_24_dataservice*)buf;
+ auto fig0_24_dataservice = (FIGtype0_24_dataservice*)buf;
- fig0_2serviceData->SId = htonl(serviceFIG0_24->service_id);
- fig0_2serviceData->rfa = 0;
- fig0_2serviceData->CAId = 0;
- fig0_2serviceData->Length = serviceFIG0_24->other_ensembles.size();
+ fig0_24_dataservice->SId = htonl(serviceFIG0_24->service_id);
+ fig0_24_dataservice->rfa = 0;
+ fig0_24_dataservice->CAId = 0;
+ fig0_24_dataservice->Length = serviceFIG0_24->other_ensembles.size();
buf += 4;
fig0->Length += 4;
remaining -= 4;