OSDN Git Service

tunerec: make buf malloc-ed instead of fixed array
[rec10/rec10-git.git] / tunerec / tunerec.c
index fad6b6d..822200a 100755 (executable)
@@ -235,7 +235,7 @@ void record(int adapter_nr, char* output, int rectime) {
 void * record_read(void * priv) {
        ssize_t rt;
        time_t start_time, current_time;
-       char buf[DVB_READ_BUFFER_SIZE];
+       char* buf = malloc(DVB_READ_BUFFER_SIZE);
        my_thread_arg* p = (my_thread_arg*)priv;
 
        start_time = time(NULL);
@@ -272,7 +272,7 @@ void * record_read(void * priv) {
 
 void * record_write(void * priv) {
        ssize_t rt = 0, wt, shift;
-       char buf[DVB_WRITE_BUFFER_SIZE];
+       char* buf = malloc(DVB_WRITE_BUFFER_SIZE);
        my_thread_arg* p = (my_thread_arg*)priv;
 
        while ( 1 ) {