diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3cb7f400..1bead950 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,7 +18,7 @@ include_directories ("${PROJECT_SOURCE_DIR}/lib_ccx") include_directories ("${PROJECT_SOURCE_DIR}/gpacmp4/") include_directories ("${PROJECT_SOURCE_DIR}/libccx_common/") -SET (CMAKE_C_FLAGS "-O3 -Wall -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64") +SET (CMAKE_C_FLAGS "-O0 -Wall -g -std=gnu99 -Wno-write-strings -D_FILE_OFFSET_BITS=64") add_subdirectory (lib_ccx) AUX_SOURCE_DIRECTORY(${PROJECT_SOURCE_DIR} SOURCEFILE) diff --git a/src/lib_ccx/CMakeLists.txt b/src/lib_ccx/CMakeLists.txt index 571b6216..50956f4b 100644 --- a/src/lib_ccx/CMakeLists.txt +++ b/src/lib_ccx/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_policy(SET CMP0037 NEW) -SET (CMAKE_C_FLAGS "-O3 -Wall -std=gnu99") +SET (CMAKE_C_FLAGS "-O0 -Wall -g -std=gnu99") AUX_SOURCE_DIRECTORY("${PROJECT_SOURCE_DIR}/lib_ccx/" SOURCEFILE) AUX_SOURCE_DIRECTORY("${PROJECT_SOURCE_DIR}/gpacmp4/" SOURCEFILE) #AUX_SOURCE_DIRECTORY("${PROJECT_SOURCE_DIR}/libpng/" SOURCEFILE) diff --git a/src/lib_ccx/ccx_common_option.h b/src/lib_ccx/ccx_common_option.h index c7025041..a55773ce 100644 --- a/src/lib_ccx/ccx_common_option.h +++ b/src/lib_ccx/ccx_common_option.h @@ -87,7 +87,7 @@ struct ccx_s_options // Options from user parameters int num_input_files; // How many? enum ccx_stream_mode_enum auto_stream; LLONG subs_delay; // ms to delay (or advance) subs - int *cc_to_stdout; // If this is set to 1, the stdout will be flushed when data was written to the screen during a process_608 call. + int cc_to_stdout; // If this is set to 1, the stdout will be flushed when data was written to the screen during a process_608 call. // Output structures struct ccx_s_write wbout1; struct ccx_s_write wbout2; diff --git a/src/lib_ccx/ccx_decoders_608.c b/src/lib_ccx/ccx_decoders_608.c index 696d90b6..7b5f659c 100644 --- a/src/lib_ccx/ccx_decoders_608.c +++ b/src/lib_ccx/ccx_decoders_608.c @@ -1197,7 +1197,7 @@ int process608(const unsigned char *data, int length, ccx_decoder_608_context *c context->current_visible_start_ms = get_visible_start(); } } - if (wrote_to_screen && *context->cc_to_stdout) + if (wrote_to_screen && context->cc_to_stdout) fflush (stdout); } // for return i; diff --git a/src/lib_ccx/ccx_decoders_608.h b/src/lib_ccx/ccx_decoders_608.h index 9e98f31e..1736a673 100644 --- a/src/lib_ccx/ccx_decoders_608.h +++ b/src/lib_ccx/ccx_decoders_608.h @@ -52,7 +52,7 @@ typedef struct ccx_decoder_608_context enum ccx_encoding_type encoding; int *halt; // Can be used to halt the feeding of caption data. Set to 1 if screens_to_progress != -1 && screenfuls_counter >= screens_to_process - int *cc_to_stdout; // If this is set to 1, the stdout will be flushed when data was written to the screen during a process_608 call. + int cc_to_stdout; // If this is set to 1, the stdout will be flushed when data was written to the screen during a process_608 call. } ccx_decoder_608_context; extern unsigned char *enc_buffer; @@ -146,4 +146,4 @@ unsigned char *debug_608toASC(unsigned char *ccdata, int channel); LLONG get_visible_end(void); #define __608_H__ -#endif \ No newline at end of file +#endif