aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-10-12 09:46:31 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-10-12 09:46:51 +0200
commitdc959aa6b105056cafc9e6f98b84c8abda309ca8 (patch)
treed8f60edddcd1f0ddc7bd3d76af8f045a564822ea /src
parent94103967933f4720d0d053735cd1da5e3bbe7a86 (diff)
downloadODR-AudioEnc-dc959aa6b105056cafc9e6f98b84c8abda309ca8.tar.gz
ODR-AudioEnc-dc959aa6b105056cafc9e6f98b84c8abda309ca8.tar.bz2
ODR-AudioEnc-dc959aa6b105056cafc9e6f98b84c8abda309ca8.zip
Set default pad length to 6 and add warning if no PAD enabled
Diffstat (limited to 'src')
-rw-r--r--src/odr-audioenc.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp
index 8cc8b9e..f6b8b94 100644
--- a/src/odr-audioenc.cpp
+++ b/src/odr-audioenc.cpp
@@ -469,7 +469,7 @@ public:
/* For MOT Slideshow and DLS insertion */
string pad_ident = "";
PadInterface pad_intf;
- int padlen = 0;
+ int padlen = 6;
/* Encoder status, see the above STATUS macros */
int status = 0;
@@ -635,10 +635,18 @@ int AudioEnc::run()
edi_output.set_odr_version_tag(ss.str());
}
+ if (pad_ident.empty()) {
+ // Override both default value and user-configured value if no ident given
+ padlen = 0;
+ }
+
if (padlen != 0 and not pad_ident.empty()) {
pad_intf.open(pad_ident);
fprintf(stderr, "PAD socket opened\n");
}
+ else {
+ fprintf(stderr, "PAD disabled because neither PAD length nor PAD identifier given\n");
+ }
vec_u8 input_buf;