aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dabplus-enc.cpp3
-rw-r--r--src/mot-encoder.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/dabplus-enc.cpp b/src/dabplus-enc.cpp
index 3fdb852..7ab23d1 100644
--- a/src/dabplus-enc.cpp
+++ b/src/dabplus-enc.cpp
@@ -277,7 +277,6 @@ int main(int argc, char *argv[])
/* For MOT Slideshow and DLS insertion */
const char* pad_fifo = "/tmp/pad.fifo";
int pad_fd;
- unsigned char pad_buf[128];
int padlen = 0;
/* Encoder status, see the above STATUS macros */
@@ -625,6 +624,8 @@ int main(int argc, char *argv[])
uint8_t outbuf[24*120];
+ unsigned char pad_buf[padlen];
+
if(outbuf_size % 5 != 0) {
fprintf(stderr, "(outbuf_size mod 5) = %d\n", outbuf_size % 5);
}
diff --git a/src/mot-encoder.cpp b/src/mot-encoder.cpp
index ea1e230..bc5b736 100644
--- a/src/mot-encoder.cpp
+++ b/src/mot-encoder.cpp
@@ -1062,7 +1062,7 @@ void writeMotPAD(int output_fd,
unsigned short int padlen)
{
- unsigned char pad[128];
+ unsigned char pad[padlen];
int xpadlengthmask, i, j, k;
unsigned short int crc;