From 5596daacb1b8ac8bd396882abf827887cae4b1c9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 15 Oct 2010 05:43:25 +0200 Subject: multicat: improve signal and EOF handling --- multicat.c | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/multicat.c b/multicat.c index de62418..4983a13 100644 --- a/multicat.c +++ b/multicat.c @@ -42,7 +42,7 @@ /***************************************************************************** * Local declarations *****************************************************************************/ -static int i_input_fd, i_output_fd; +static int i_input_fd = -1, i_output_fd; FILE *p_input_aux, *p_output_aux; static uint16_t i_pcr_pid = 0; static bool b_overwrite_ssrc = false; @@ -59,11 +59,15 @@ void (*pf_Skip)( size_t i_len, int i_nb_chunks ); ssize_t (*pf_Read)( void *p_buf, size_t i_len ); ssize_t (*pf_Write)( const void *p_buf, size_t i_len ); +extern int i_verbose; + static void usage(void) { - msg_Raw( NULL, "Usage: multicat [-i ] [-t ] [-p ] [-s ] [-n ] [-d