diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-02-22 16:42:53 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2021-02-22 16:42:53 +0100 |
commit | fca780ffb85da75da805aac040d0886e954a7804 (patch) | |
tree | 60833358737fd683f0256d41991d4e04faeecf55 /src/zmq2edi/zmq2edi.cpp | |
parent | 220549b9980f1e15c1299084fb06a0df4ab5f2cf (diff) | |
download | dabmux-fca780ffb85da75da805aac040d0886e954a7804.tar.gz dabmux-fca780ffb85da75da805aac040d0886e954a7804.tar.bz2 dabmux-fca780ffb85da75da805aac040d0886e954a7804.zip |
Allow setting EDI UDP fragment spreading to 0
Diffstat (limited to 'src/zmq2edi/zmq2edi.cpp')
-rw-r--r-- | src/zmq2edi/zmq2edi.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/zmq2edi/zmq2edi.cpp b/src/zmq2edi/zmq2edi.cpp index bd5a3ae..cff16c7 100644 --- a/src/zmq2edi/zmq2edi.cpp +++ b/src/zmq2edi/zmq2edi.cpp @@ -274,15 +274,13 @@ int start(int argc, char **argv) case 'i': { int spread_percent = std::stoi(optarg); - if (spread_percent != 0) { - if (spread_percent < 0) { - throw std::runtime_error("EDI output: negative spread value is invalid."); - } + if (spread_percent < 0) { + throw std::runtime_error("EDI output: negative 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.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!"); } } break; |