summaryrefslogtreecommitdiffstats
path: root/src/fig/FIG1.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-15 22:31:22 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-15 22:31:22 +0200
commita9814a2a8e02928d69b28247b3e7c2a468d8987b (patch)
treedecb06bbd747fcba1b17e0238a97179e1249ea7d /src/fig/FIG1.cpp
parent22aa6579ed01d01fa717d624731242b06228e97c (diff)
downloaddabmux-a9814a2a8e02928d69b28247b3e7c2a468d8987b.tar.gz
dabmux-a9814a2a8e02928d69b28247b3e7c2a468d8987b.tar.bz2
dabmux-a9814a2a8e02928d69b28247b3e7c2a468d8987b.zip
Move FIG completion flag after loops
Diffstat (limited to 'src/fig/FIG1.cpp')
-rw-r--r--src/fig/FIG1.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/fig/FIG1.cpp b/src/fig/FIG1.cpp
index 160c3b9..46e7c4b 100644
--- a/src/fig/FIG1.cpp
+++ b/src/fig/FIG1.cpp
@@ -84,11 +84,6 @@ FillStatus FIG1_1::fill(uint8_t *buf, size_t max_size)
// Rotate through the subchannels until there is no more
// space
- if (service == ensemble->services.end()) {
- service = ensemble->services.begin();
- fs.complete_fig_transmitted = true;
- }
-
for (; service != ensemble->services.end();
++service) {
@@ -120,6 +115,11 @@ FillStatus FIG1_1::fill(uint8_t *buf, size_t max_size)
}
}
+ if (service == ensemble->services.end()) {
+ service = ensemble->services.begin();
+ fs.complete_fig_transmitted = true;
+ }
+
fs.num_bytes_written = max_size - remaining;
return fs;
}
@@ -141,11 +141,6 @@ FillStatus FIG1_4::fill(uint8_t *buf, size_t max_size)
// Rotate through the subchannels until there is no more
// space
- if (component == ensemble->components.end()) {
- component = ensemble->components.begin();
- fs.complete_fig_transmitted = true;
- }
-
for (; component != ensemble->components.end();
++component) {
@@ -207,6 +202,11 @@ FillStatus FIG1_4::fill(uint8_t *buf, size_t max_size)
}
}
+ if (component == ensemble->components.end()) {
+ component = ensemble->components.begin();
+ fs.complete_fig_transmitted = true;
+ }
+
fs.num_bytes_written = max_size - remaining;
return fs;
}
@@ -228,11 +228,6 @@ FillStatus FIG1_5::fill(uint8_t *buf, size_t max_size)
// Rotate through the subchannels until there is no more
// space
- if (service == ensemble->services.end()) {
- service = ensemble->services.begin();
- fs.complete_fig_transmitted = true;
- }
-
for (; service != ensemble->services.end();
++service) {
@@ -263,6 +258,11 @@ FillStatus FIG1_5::fill(uint8_t *buf, size_t max_size)
}
}
+ if (service == ensemble->services.end()) {
+ service = ensemble->services.begin();
+ fs.complete_fig_transmitted = true;
+ }
+
fs.num_bytes_written = max_size - remaining;
return fs;
}