Commit ec0c77b9 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mux: remove return value from sout_mux_t.pf_delstream

This is always VLC_SUCCESS anyway.
parent 21dfee9d
......@@ -115,7 +115,7 @@ struct sout_mux_t
sout_access_out_t *p_access;
int (*pf_addstream)( sout_mux_t *, sout_input_t * );
int (*pf_delstream)( sout_mux_t *, sout_input_t * );
void (*pf_delstream)( sout_mux_t *, sout_input_t * );
int (*pf_mux) ( sout_mux_t * );
int (*pf_control) ( sout_mux_t *, int, va_list );
......
......@@ -68,7 +68,7 @@ struct sout_mux_sys_t
*****************************************************************************/
static int Control ( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
static int IOWrite( void *opaque, uint8_t *buf, int buf_size );
......@@ -300,11 +300,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
/*****************************************************************************
* DelStream
*****************************************************************************/
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
msg_Dbg( p_mux, "removing input" );
free( p_input->p_sys );
return VLC_SUCCESS;
}
static int MuxBlock( sout_mux_t *p_mux, sout_input_t *p_input )
......
......@@ -105,7 +105,7 @@ static const char *const ppsz_sout_options[] = {
static int Control ( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
typedef struct
......@@ -634,7 +634,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
/*****************************************************************************
* DelStream:
*****************************************************************************/
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
/* if bitrate ain't defined in commandline, reduce it when tracks are deleted
*/
......@@ -664,7 +664,6 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
vlc_array_remove( p_sys->p_tracks, vlc_array_index_of_item( p_sys->p_tracks, (void *)tk ) );
p_sys->b_write_header = true;
}
return VLC_SUCCESS;
}
/*****************************************************************************
......
......@@ -84,7 +84,7 @@ vlc_module_end ()
*****************************************************************************/
static int Control( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
typedef struct avi_stream_s
......@@ -456,12 +456,11 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
return( VLC_SUCCESS );
}
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
msg_Dbg( p_mux, "removing input" );
free( p_input->p_sys );
return 0;
}
static int Mux ( sout_mux_t *p_mux )
......
......@@ -55,7 +55,7 @@ vlc_module_end ()
*****************************************************************************/
static int Control( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
struct sout_mux_sys_t
......@@ -132,11 +132,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
return VLC_SUCCESS;
}
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
VLC_UNUSED(p_input);
msg_Dbg( p_mux, "removing input" );
return VLC_SUCCESS;
}
static int Mux( sout_mux_t *p_mux )
......
......@@ -95,7 +95,7 @@ static const char *const ppsz_sout_options[] = {
static int Control(sout_mux_t *, int, va_list);
static int AddStream(sout_mux_t *, sout_input_t *);
static int DelStream(sout_mux_t *, sout_input_t *);
static void DelStream(sout_mux_t *, sout_input_t *);
static int Mux (sout_mux_t *);
static int MuxFrag (sout_mux_t *);
......@@ -527,11 +527,10 @@ static int AddStream(sout_mux_t *p_mux, sout_input_t *p_input)
/*****************************************************************************
* DelStream:
*****************************************************************************/
static int DelStream(sout_mux_t *p_mux, sout_input_t *p_input)
static void DelStream(sout_mux_t *p_mux, sout_input_t *p_input)
{
VLC_UNUSED(p_input);
msg_Dbg(p_mux, "removing input");
return VLC_SUCCESS;
}
/*****************************************************************************
......
......@@ -80,7 +80,7 @@ vlc_module_end ()
*****************************************************************************/
static int Control ( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
/*****************************************************************************
......@@ -383,7 +383,7 @@ error:
/*****************************************************************************
* DelStream:
*****************************************************************************/
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
ps_stream_t *p_stream =(ps_stream_t*)p_input->p_sys;
......@@ -437,7 +437,6 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
p_sys->i_psm_version++;
free( p_stream );
return VLC_SUCCESS;
}
/*****************************************************************************
......
......@@ -456,7 +456,7 @@ static int intcompare( const void *pa, const void *pb )
*****************************************************************************/
static int Control ( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo );
......@@ -1127,7 +1127,7 @@ oom:
/*****************************************************************************
* DelStream: called before a stream deletion
*****************************************************************************/
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
sout_input_sys_t *p_stream = (sout_input_sys_t*)p_input->p_sys;
......@@ -1200,8 +1200,6 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
/* We only change PMT version (PAT isn't changed) */
p_sys->i_pmt_version_number++;
p_sys->i_pmt_version_number %= 32;
return VLC_SUCCESS;
}
static void SetHeader( sout_buffer_chain_t *c,
......
......@@ -57,7 +57,7 @@ vlc_module_end ()
*****************************************************************************/
static int Control ( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
/* This pseudo-random sequence is unlikely to ever happen */
......@@ -136,11 +136,10 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
return VLC_SUCCESS;
}
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
VLC_UNUSED(p_input);
msg_Dbg( p_mux, "removing input" );
return VLC_SUCCESS;
}
static int Mux( sout_mux_t *p_mux )
......
......@@ -75,7 +75,7 @@ vlc_module_end ()
*****************************************************************************/
static int Control ( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
static int MuxBlock ( sout_mux_t *, sout_input_t * );
......@@ -555,7 +555,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
/*****************************************************************************
* DelStream: Delete an elementary stream from the muxed stream
*****************************************************************************/
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
ogg_stream_t *p_stream = (ogg_stream_t*)p_input->p_sys;
......
......@@ -56,7 +56,7 @@ vlc_module_end ()
*****************************************************************************/
static int Control ( sout_mux_t *, int, va_list );
static int AddStream( sout_mux_t *, sout_input_t * );
static int DelStream( sout_mux_t *, sout_input_t * );
static void DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
#define MAX_CHANNELS 6
......@@ -255,7 +255,7 @@ static block_t *GetHeader( sout_mux_t *p_mux )
return p_block;
}
static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
static void DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
VLC_UNUSED(p_input);
msg_Dbg( p_mux, "removing input" );
......@@ -265,8 +265,6 @@ static int DelStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
sout_AccessOutWrite( p_mux->p_access, GetHeader( p_mux ) );
}
return VLC_SUCCESS;
}
static int Mux( sout_mux_t *p_mux )
......
......@@ -490,10 +490,7 @@ void sout_MuxDeleteStream( sout_mux_t *p_mux, sout_input_t *p_input )
TAB_FIND( p_mux->i_nb_inputs, p_mux->pp_inputs, p_input, i_index );
if( i_index >= 0 )
{
if( p_mux->pf_delstream( p_mux, p_input ) < 0 )
{
msg_Err( p_mux, "cannot delete this stream from mux" );
}
p_mux->pf_delstream( p_mux, p_input );
/* remove the entry */
TAB_REMOVE( p_mux->i_nb_inputs, p_mux->pp_inputs, p_input );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment