diff options
Diffstat (limited to 'src/fig/FIG1.cpp')
-rw-r--r-- | src/fig/FIG1.cpp | 30 |
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; } |