summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libtoolame-dab/toolame.c2
-rw-r--r--src/odr-audioenc.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/libtoolame-dab/toolame.c b/libtoolame-dab/toolame.c
index b8a7afb..4e0c7d8 100644
--- a/libtoolame-dab/toolame.c
+++ b/libtoolame-dab/toolame.c
@@ -522,7 +522,7 @@ int toolame_encode_frame(
if (xpad_len) {
- assert(xpad_len > 2);
+ assert(xpad_len >= FPAD_LENGTH);
// insert available X-PAD
for (int i = header.dab_length - xpad_len;
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp
index ca4faec..14666a5 100644
--- a/src/odr-audioenc.cpp
+++ b/src/odr-audioenc.cpp
@@ -1207,9 +1207,9 @@ int main(int argc, char *argv[])
int calculated_padlen = 0;
if (pad_ret == padlen + 1) {
calculated_padlen = pad_buf[padlen];
- if (calculated_padlen <= 2) {
+ if (calculated_padlen < 2) {
stringstream ss;
- ss << "Invalid XPAD Length " << calculated_padlen;
+ ss << "Invalid X-PAD length " << calculated_padlen;
throw runtime_error(ss.str());
}
}