From fb6ab762301d5da6b0eb3293d19cf545c4caf6ad Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 13 Feb 2019 10:29:53 +0100 Subject: Fix FIG0/24 for DAB+ services --- src/fig/FIG0_24.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/fig') 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; -- cgit v1.2.3