aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMux.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-02-22 16:42:53 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-02-22 16:42:53 +0100
commitfca780ffb85da75da805aac040d0886e954a7804 (patch)
tree60833358737fd683f0256d41991d4e04faeecf55 /src/DabMux.cpp
parent220549b9980f1e15c1299084fb06a0df4ab5f2cf (diff)
downloaddabmux-fca780ffb85da75da805aac040d0886e954a7804.tar.gz
dabmux-fca780ffb85da75da805aac040d0886e954a7804.tar.bz2
dabmux-fca780ffb85da75da805aac040d0886e954a7804.zip
Allow setting EDI UDP fragment spreading to 0
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r--src/DabMux.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 70eee69..3938131 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -363,16 +363,12 @@ int main(int argc, char *argv[])
edi_conf.chunk_len = pt_edi.get<unsigned int>("chunk_len", 207);
int spread_percent = pt_edi.get<int>("packet_spread", 95);
- if (spread_percent != 0) {
- if (spread_percent < 0) {
- throw std::runtime_error("EDI output: negative packet_spread value is invalid.");
- }
-
- edi_conf.fragment_spreading_factor = (double)spread_percent / 100.0;
-
- if (edi_conf.fragment_spreading_factor > 30000) {
- throw std::runtime_error("EDI output: interleaving set for more than 30 seconds!");
- }
+ if (spread_percent < 0) {
+ throw std::runtime_error("EDI output: negative packet_spread value is invalid.");
+ }
+ edi_conf.fragment_spreading_factor = (double)spread_percent / 100.0;
+ if (edi_conf.fragment_spreading_factor > 30000) {
+ throw std::runtime_error("EDI output: interleaving set for more than 30 seconds!");
}
edi_conf.tagpacket_alignment = pt_edi.get<unsigned int>("tagpacket_alignment", 8);