summaryrefslogtreecommitdiffstats
path: root/src/fig/FIG1.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 10:30:59 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-02-13 10:30:59 +0100
commit8ff89e414770a922e45eee829b672aceb10ea609 (patch)
treeaccdab3630119096ce4f6361942a49152bd564b3 /src/fig/FIG1.cpp
parentfb6ab762301d5da6b0eb3293d19cf545c4caf6ad (diff)
downloaddabmux-8ff89e414770a922e45eee829b672aceb10ea609.tar.gz
dabmux-8ff89e414770a922e45eee829b672aceb10ea609.tar.bz2
dabmux-8ff89e414770a922e45eee829b672aceb10ea609.zip
Simplify and use isProgramme where possible
Diffstat (limited to 'src/fig/FIG1.cpp')
-rw-r--r--src/fig/FIG1.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fig/FIG1.cpp b/src/fig/FIG1.cpp
index d0b6a17..6683f17 100644
--- a/src/fig/FIG1.cpp
+++ b/src/fig/FIG1.cpp
@@ -94,10 +94,9 @@ FillStatus FIG1_1::fill(uint8_t *buf, size_t max_size)
break;
}
- const auto type = (*service)->getType(ensemble);
+ const bool is_programme = (*service)->isProgramme(ensemble);
- if ( (type == subchannel_type_t::DABPlusAudio or type == subchannel_type_t::DABAudio) and
- (*service)->label.has_fig1_label()) {
+ if (is_programme and (*service)->label.has_fig1_label()) {
auto fig1_1 = (FIGtype1_1 *)buf;
fig1_1->FIGtypeNumber = 1;
@@ -155,10 +154,8 @@ FillStatus FIG1_4::fill(uint8_t *buf, size_t max_size)
/* We check in the config parser if the primary component has
* a label, which is forbidden since V2.1.1 */
- const auto type = (*service)->getType(ensemble);
-
if (not (*component)->label.long_label().empty() ) {
- if (type == subchannel_type_t::DABAudio or type == subchannel_type_t::DABPlusAudio) {
+ if ((*service)->isProgramme(ensemble)) {
if (remaining < 5 + 16 + 2) {
break;