X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmux%2Fwav.c;h=581c07591e0e7cb0fd95915c351217fd6543ed7f;hb=25ad0cdef1cfe031218aae58017a5124335f55d0;hp=a8a0f86ad16be5bb51906e8ba01c9156c8d9aa34;hpb=d3fe7f28797d4dba65ffcdd60bf932e758a48a9e;p=vlc diff --git a/modules/mux/wav.c b/modules/mux/wav.c index a8a0f86ad1..581c07591e 100644 --- a/modules/mux/wav.c +++ b/modules/mux/wav.c @@ -24,7 +24,10 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include #include @@ -127,29 +130,30 @@ static void Close( vlc_object_t * p_this ) static int Control( sout_mux_t *p_mux, int i_query, va_list args ) { + VLC_UNUSED(p_mux); vlc_bool_t *pb_bool; char **ppsz; - switch( i_query ) - { - case MUX_CAN_ADD_STREAM_WHILE_MUXING: - pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * ); - *pb_bool = VLC_FALSE; - return VLC_SUCCESS; + switch( i_query ) + { + case MUX_CAN_ADD_STREAM_WHILE_MUXING: + pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * ); + *pb_bool = VLC_FALSE; + return VLC_SUCCESS; - case MUX_GET_ADD_STREAM_WAIT: - pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * ); - *pb_bool = VLC_TRUE; - return VLC_SUCCESS; + case MUX_GET_ADD_STREAM_WAIT: + pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t * ); + *pb_bool = VLC_TRUE; + return VLC_SUCCESS; - case MUX_GET_MIME: - ppsz = (char**)va_arg( args, char ** ); - *ppsz = strdup( "audio/wav" ); - return VLC_SUCCESS; + case MUX_GET_MIME: + ppsz = (char**)va_arg( args, char ** ); + *ppsz = strdup( "audio/wav" ); + return VLC_SUCCESS; default: return VLC_EGENERIC; - } + } } static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) { @@ -179,7 +183,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) if( p_input->p_fmt->audio.i_physical_channels ) { unsigned int i; - + for( i = 0; i < sizeof(pi_channels_in)/sizeof(uint32_t); i++ ) { if( p_input->p_fmt->audio.i_physical_channels & pi_channels_src[i]) @@ -260,10 +264,11 @@ static block_t *GetHeader( sout_mux_t *p_mux ) static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input ) { + VLC_UNUSED(p_input); msg_Dbg( p_mux, "removing input" ); msg_Dbg( p_mux, "writing header data" ); - if( !sout_AccessOutSeek( p_mux->p_access, 0 ) ) + if( sout_AccessOutSeek( p_mux->p_access, 0 ) == VLC_SUCCESS ) { sout_AccessOutWrite( p_mux->p_access, GetHeader( p_mux ) ); } @@ -286,7 +291,7 @@ static int Mux( sout_mux_t *p_mux ) p_sys->b_header = VLC_FALSE; p_input = p_mux->pp_inputs[0]; - while( p_input->p_fifo->i_depth > 0 ) + while( block_FifoCount( p_input->p_fifo ) > 0 ) { block_t *p_block = block_FifoGet( p_input->p_fifo ); p_sys->i_data += p_block->i_buffer;