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

sout: voidify sout_stream_t.pf_del

This is always VLC_SUCCESS, or a forwarded value. Ultimately, the
value was (rightfully) ignored by the stream output core.
parent c599964d
...@@ -187,7 +187,7 @@ struct sout_stream_t ...@@ -187,7 +187,7 @@ struct sout_stream_t
/* add, remove a stream */ /* add, remove a stream */
sout_stream_id_sys_t *(*pf_add)( sout_stream_t *, es_format_t * ); sout_stream_id_sys_t *(*pf_add)( sout_stream_t *, es_format_t * );
int (*pf_del)( sout_stream_t *, sout_stream_id_sys_t * ); void (*pf_del)( sout_stream_t *, sout_stream_id_sys_t * );
/* manage a packet */ /* manage a packet */
int (*pf_send)( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); int (*pf_send)( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
...@@ -203,9 +203,9 @@ static inline sout_stream_id_sys_t *sout_StreamIdAdd( sout_stream_t *s, es_forma ...@@ -203,9 +203,9 @@ static inline sout_stream_id_sys_t *sout_StreamIdAdd( sout_stream_t *s, es_forma
{ {
return s->pf_add( s, fmt ); return s->pf_add( s, fmt );
} }
static inline int sout_StreamIdDel( sout_stream_t *s, sout_stream_id_sys_t *id ) static inline void sout_StreamIdDel( sout_stream_t *s, sout_stream_id_sys_t *id )
{ {
return s->pf_del( s, id ); s->pf_del( s, id );
} }
static inline int sout_StreamIdSend( sout_stream_t *s, sout_stream_id_sys_t *id, block_t *b ) static inline int sout_StreamIdSend( sout_stream_t *s, sout_stream_id_sys_t *id, block_t *b )
{ {
......
...@@ -55,7 +55,7 @@ vlc_module_end () ...@@ -55,7 +55,7 @@ vlc_module_end ()
* Local prototypes * Local prototypes
*****************************************************************************/ *****************************************************************************/
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
struct sout_stream_id_sys_t struct sout_stream_id_sys_t
...@@ -125,7 +125,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -125,7 +125,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return p_es; return p_es;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *p_es ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *p_es )
{ {
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys; sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
sout_stream_id_sys_t *id = p_es->id; sout_stream_id_sys_t *id = p_es->id;
...@@ -134,9 +134,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *p_es ) ...@@ -134,9 +134,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *p_es )
free( p_es ); free( p_es );
if ( id != NULL ) if ( id != NULL )
return p_stream->p_next->pf_del( p_stream->p_next, id ); p_stream->p_next->pf_del( p_stream->p_next, id );
else
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *p_es, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *p_es,
......
...@@ -141,11 +141,11 @@ static const char *const ppsz_sout_options_in[] = { ...@@ -141,11 +141,11 @@ static const char *const ppsz_sout_options_in[] = {
}; };
static sout_stream_id_sys_t *AddOut ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *AddOut ( sout_stream_t *, es_format_t * );
static int DelOut ( sout_stream_t *, sout_stream_id_sys_t * ); static void DelOut ( sout_stream_t *, sout_stream_id_sys_t * );
static int SendOut( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int SendOut( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
static sout_stream_id_sys_t *AddIn ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *AddIn ( sout_stream_t *, es_format_t * );
static int DelIn ( sout_stream_t *, sout_stream_id_sys_t * ); static void DelIn ( sout_stream_t *, sout_stream_id_sys_t * );
static int SendIn( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int SendIn( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
typedef struct bridged_es_t typedef struct bridged_es_t
...@@ -295,16 +295,14 @@ static sout_stream_id_sys_t * AddOut( sout_stream_t *p_stream, es_format_t *p_fm ...@@ -295,16 +295,14 @@ static sout_stream_id_sys_t * AddOut( sout_stream_t *p_stream, es_format_t *p_fm
return (sout_stream_id_sys_t *)p_sys; return (sout_stream_id_sys_t *)p_sys;
} }
static int DelOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void DelOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
VLC_UNUSED(id); VLC_UNUSED(id);
out_sout_stream_sys_t *p_sys = (out_sout_stream_sys_t *)p_stream->p_sys; out_sout_stream_sys_t *p_sys = (out_sout_stream_sys_t *)p_stream->p_sys;
bridged_es_t *p_es; bridged_es_t *p_es;
if ( !p_sys->b_inited ) if ( !p_sys->b_inited )
{ return;
return VLC_SUCCESS;
}
vlc_mutex_lock( &lock ); vlc_mutex_lock( &lock );
...@@ -318,8 +316,6 @@ static int DelOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -318,8 +316,6 @@ static int DelOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
vlc_mutex_unlock( &lock ); vlc_mutex_unlock( &lock );
p_sys->b_inited = false; p_sys->b_inited = false;
return VLC_SUCCESS;
} }
static int SendOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int SendOut( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
...@@ -490,17 +486,15 @@ static sout_stream_id_sys_t * AddIn( sout_stream_t *p_stream, es_format_t *p_fmt ...@@ -490,17 +486,15 @@ static sout_stream_id_sys_t * AddIn( sout_stream_t *p_stream, es_format_t *p_fmt
return id; return id;
} }
static int DelIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void DelIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
in_sout_stream_sys_t *p_sys = (in_sout_stream_sys_t *)p_stream->p_sys; in_sout_stream_sys_t *p_sys = (in_sout_stream_sys_t *)p_stream->p_sys;
if( id == p_sys->id_video ) p_sys->id_video = NULL; if( id == p_sys->id_video ) p_sys->id_video = NULL;
if( id == p_sys->id_audio ) p_sys->id_audio = NULL; if( id == p_sys->id_audio ) p_sys->id_audio = NULL;
int ret = p_stream->p_next->pf_del( p_stream->p_next, id->id ); p_stream->p_next->pf_del( p_stream->p_next, id->id );
free( id ); free( id );
return ret;
} }
static int SendIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int SendIn( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -48,7 +48,7 @@ static int Open ( vlc_object_t * ); ...@@ -48,7 +48,7 @@ static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
/***************************************************************************** /*****************************************************************************
...@@ -200,14 +200,13 @@ error: ...@@ -200,14 +200,13 @@ error:
return NULL; return NULL;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
Finish( p_stream ); Finish( p_stream );
if ( p_sys->id == id ) /* not assuming only 1 id is in use.. */ if ( p_sys->id == id ) /* not assuming only 1 id is in use.. */
p_sys->id = NULL; p_sys->id = NULL;
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -182,10 +182,11 @@ static sout_stream_id_sys_t *Add(sout_stream_t *p_stream, es_format_t *p_fmt) ...@@ -182,10 +182,11 @@ static sout_stream_id_sys_t *Add(sout_stream_t *p_stream, es_format_t *p_fmt)
} }
static int Del(sout_stream_t *p_stream, sout_stream_id_sys_t *id) static void Del(sout_stream_t *p_stream, sout_stream_id_sys_t *id)
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
return p_sys->p_out->pf_del(p_sys->p_out, id);
p_sys->p_out->pf_del(p_sys->p_out, id);
} }
......
...@@ -96,7 +96,7 @@ static sout_stream_id_sys_t *Add(sout_stream_t *stream, es_format_t *fmt) ...@@ -96,7 +96,7 @@ static sout_stream_id_sys_t *Add(sout_stream_t *stream, es_format_t *fmt)
return id; return id;
} }
static int Del(sout_stream_t *stream, sout_stream_id_sys_t *id) static void Del(sout_stream_t *stream, sout_stream_id_sys_t *id)
{ {
sout_stream_sys_t *sys = stream->p_sys; sout_stream_sys_t *sys = stream->p_sys;
...@@ -115,7 +115,6 @@ static int Del(sout_stream_t *stream, sout_stream_id_sys_t *id) ...@@ -115,7 +115,6 @@ static int Del(sout_stream_t *stream, sout_stream_id_sys_t *id)
es_format_Clean(&id->fmt); es_format_Clean(&id->fmt);
free(id); free(id);
return VLC_SUCCESS;
} }
static int AddStream(sout_stream_t *stream, char *chain) static int AddStream(sout_stream_t *stream, char *chain)
......
...@@ -73,7 +73,7 @@ static const char *ppsz_sout_options[] = { ...@@ -73,7 +73,7 @@ static const char *ppsz_sout_options[] = {
}; };
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
struct sout_stream_sys_t struct sout_stream_sys_t
...@@ -143,14 +143,14 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -143,14 +143,14 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return p_stream->p_next->pf_add( p_stream->p_next, p_fmt ); return p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys; sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
if ( id == p_sys->id ) if ( id == p_sys->id )
p_sys->id = NULL; p_sys->id = NULL;
return p_stream->p_next->pf_del( p_stream->p_next, id ); p_stream->p_next->pf_del( p_stream->p_next, id );
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -44,7 +44,7 @@ static int Open ( vlc_object_t * ); ...@@ -44,7 +44,7 @@ static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
/***************************************************************************** /*****************************************************************************
...@@ -123,12 +123,11 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -123,12 +123,11 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return (void *)p_fmt_copy; return (void *)p_fmt_copy;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
msg_Dbg( p_stream, "Removing a stream" ); msg_Dbg( p_stream, "Removing a stream" );
/* NOTE: id should be freed by the input manager, not here. */ /* NOTE: id should be freed by the input manager, not here. */
(void) id; (void) id;
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -75,7 +75,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -75,7 +75,7 @@ static const char *const ppsz_sout_options[] = {
}; };
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
struct sout_stream_sys_t struct sout_stream_sys_t
...@@ -157,11 +157,10 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -157,11 +157,10 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return (sout_stream_id_sys_t *)p_dec; return (sout_stream_id_sys_t *)p_dec;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
(void) p_stream; (void) p_stream;
input_DecoderDelete( (decoder_t *)id ); input_DecoderDelete( (decoder_t *)id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -41,7 +41,7 @@ static int Open ( vlc_object_t * ); ...@@ -41,7 +41,7 @@ static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
/***************************************************************************** /*****************************************************************************
...@@ -84,12 +84,10 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -84,12 +84,10 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return malloc( 1 ); return malloc( 1 );
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
VLC_UNUSED(p_stream); VLC_UNUSED(p_stream);
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -54,7 +54,7 @@ vlc_module_end () ...@@ -54,7 +54,7 @@ vlc_module_end ()
* Exported prototypes * Exported prototypes
*****************************************************************************/ *****************************************************************************/
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, static int Send( sout_stream_t *, sout_stream_id_sys_t *,
block_t* ); block_t* );
...@@ -239,7 +239,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -239,7 +239,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
/***************************************************************************** /*****************************************************************************
* Del: * Del:
*****************************************************************************/ *****************************************************************************/
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
int i_stream; int i_stream;
...@@ -255,7 +255,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -255,7 +255,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
free( id->pp_ids ); free( id->pp_ids );
free( id ); free( id );
return VLC_SUCCESS;
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -120,7 +120,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -120,7 +120,7 @@ static const char *const ppsz_sout_options[] = {
}; };
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
struct sout_stream_sys_t struct sout_stream_sys_t
...@@ -408,7 +408,7 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -408,7 +408,7 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return id; return id;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
VLC_UNUSED(p_stream); VLC_UNUSED(p_stream);
sout_access_out_t *p_access = id->p_mux->p_access; sout_access_out_t *p_access = id->p_mux->p_access;
...@@ -420,7 +420,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -420,7 +420,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
sout_AccessOutDelete( p_access ); sout_AccessOutDelete( p_access );
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -52,7 +52,7 @@ vlc_module_end () ...@@ -52,7 +52,7 @@ vlc_module_end ()
* Exported prototypes * Exported prototypes
*****************************************************************************/ *****************************************************************************/
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
struct sout_stream_id_sys_t struct sout_stream_id_sys_t
...@@ -197,11 +197,10 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -197,11 +197,10 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
/***************************************************************************** /*****************************************************************************
* Del: * Del:
*****************************************************************************/ *****************************************************************************/
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
VLC_UNUSED(p_stream); VLC_UNUSED(p_stream);
id->b_used = false; id->b_used = false;
return VLC_SUCCESS;
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -85,7 +85,7 @@ static const char *ppsz_sout_options[] = { ...@@ -85,7 +85,7 @@ static const char *ppsz_sout_options[] = {
}; };
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
struct sout_stream_sys_t struct sout_stream_sys_t
...@@ -173,14 +173,14 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -173,14 +173,14 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return p_stream->p_next->pf_add( p_stream->p_next, p_fmt ); return p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys; sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
if ( id == p_sys->p_id ) p_sys->p_id = NULL; if ( id == p_sys->p_id ) p_sys->p_id = NULL;
if ( id == p_sys->p_telx ) p_sys->p_telx = NULL; if ( id == p_sys->p_telx ) p_sys->p_telx = NULL;
return p_stream->p_next->pf_del( p_stream->p_next, id ); p_stream->p_next->pf_del( p_stream->p_next, id );
} }
static void SetLanguage( sout_stream_t *p_stream, char *psz_language ) static void SetLanguage( sout_stream_t *p_stream, char *psz_language )
......
...@@ -74,7 +74,7 @@ struct decoder_owner_sys_t ...@@ -74,7 +74,7 @@ struct decoder_owner_sys_t
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * ); static void Close ( vlc_object_t * );
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
inline static int video_update_format_decoder( decoder_t *p_dec ); inline static int video_update_format_decoder( decoder_t *p_dec );
...@@ -409,7 +409,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -409,7 +409,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return (sout_stream_id_sys_t *)p_sys; return (sout_stream_id_sys_t *)p_sys;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
VLC_UNUSED(id); VLC_UNUSED(id);
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
...@@ -419,7 +419,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -419,7 +419,7 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
int i; int i;
if( !p_sys->b_inited ) if( !p_sys->b_inited )
return VLC_SUCCESS; return;
if( p_sys->p_decoder != NULL ) if( p_sys->p_decoder != NULL )
{ {
...@@ -479,8 +479,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -479,8 +479,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
} }
p_sys->b_inited = false; p_sys->b_inited = false;
return VLC_SUCCESS;
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -82,7 +82,7 @@ static int Open( vlc_object_t * ); ...@@ -82,7 +82,7 @@ static int Open( vlc_object_t * );
static void Close( vlc_object_t * ); static void Close( vlc_object_t * );
static sout_stream_id_sys_t *Add( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add( sout_stream_t *, es_format_t * );
static int Del( sout_stream_t *, sout_stream_id_sys_t * ); static void Del( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
static int VolumeCallback( vlc_object_t *p_this, char const *psz_cmd, static int VolumeCallback( vlc_object_t *p_this, char const *psz_cmd,
...@@ -1621,17 +1621,14 @@ error: ...@@ -1621,17 +1621,14 @@ error:
/***************************************************************************** /*****************************************************************************
* Del: * Del:
*****************************************************************************/ *****************************************************************************/
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
int i_err = VLC_SUCCESS;
if ( p_sys->p_audio_stream == id ) if ( p_sys->p_audio_stream == id )
p_sys->p_audio_stream = NULL; p_sys->p_audio_stream = NULL;
FreeId( id ); FreeId( id );
return i_err;
} }
......
...@@ -76,7 +76,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -76,7 +76,7 @@ static const char *const ppsz_sout_options[] = {
/* */ /* */
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
/* */ /* */
...@@ -201,7 +201,7 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -201,7 +201,7 @@ static sout_stream_id_sys_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return id; return id;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
...@@ -226,8 +226,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -226,8 +226,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
} }
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -274,11 +274,11 @@ static const char *const ppsz_sout_options[] = { ...@@ -274,11 +274,11 @@ static const char *const ppsz_sout_options[] = {
}; };
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, static int Send( sout_stream_t *, sout_stream_id_sys_t *,
block_t* ); block_t* );
static sout_stream_id_sys_t *MuxAdd ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *MuxAdd ( sout_stream_t *, es_format_t * );
static int MuxDel ( sout_stream_t *, sout_stream_id_sys_t * ); static void MuxDel ( sout_stream_t *, sout_stream_id_sys_t * );
static int MuxSend( sout_stream_t *, sout_stream_id_sys_t *, static int MuxSend( sout_stream_t *, sout_stream_id_sys_t *,
block_t* ); block_t* );
...@@ -1217,7 +1217,7 @@ error: ...@@ -1217,7 +1217,7 @@ error:
return NULL; return NULL;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
...@@ -1260,7 +1260,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -1260,7 +1260,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
if( p_sys->psz_sdp_file != NULL ) FileSetup( p_stream ); if( p_sys->psz_sdp_file != NULL ) FileSetup( p_stream );
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
...@@ -1705,13 +1704,12 @@ static int MuxSend( sout_stream_t *p_stream, sout_stream_id_sys_t *id, ...@@ -1705,13 +1704,12 @@ static int MuxSend( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
/** Remove an ES from a non-RTP muxed stream */ /** Remove an ES from a non-RTP muxed stream */
static int MuxDel( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void MuxDel( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_mux_t *p_mux = p_stream->p_sys->p_mux; sout_mux_t *p_mux = p_stream->p_sys->p_mux;
assert( p_mux != NULL ); assert( p_mux != NULL );
sout_MuxDeleteStream( p_mux, (sout_input_t *)id ); sout_MuxDeleteStream( p_mux, (sout_input_t *)id );
return VLC_SUCCESS;
} }
......
...@@ -97,7 +97,7 @@ static const char *ppsz_sout_options_lang[] = { ...@@ -97,7 +97,7 @@ static const char *ppsz_sout_options_lang[] = {
static sout_stream_id_sys_t *AddId ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *AddId ( sout_stream_t *, es_format_t * );
static sout_stream_id_sys_t *AddLang ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *AddLang ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
struct sout_stream_sys_t struct sout_stream_sys_t
...@@ -214,9 +214,9 @@ static sout_stream_id_sys_t * AddLang( sout_stream_t *p_stream, es_format_t *p_f ...@@ -214,9 +214,9 @@ static sout_stream_id_sys_t * AddLang( sout_stream_t *p_stream, es_format_t *p_f
return p_stream->p_next->pf_add( p_stream->p_next, p_fmt ); return p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
return p_stream->p_next->pf_del( p_stream->p_next, id ); p_stream->p_next->pf_del( p_stream->p_next, id );
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -126,7 +126,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -126,7 +126,7 @@ static const char *const ppsz_sout_options[] = {
}; };
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream, es_format_t *p_fmt ); static sout_stream_id_sys_t *AddVideo( sout_stream_t *p_stream, es_format_t *p_fmt );
...@@ -291,11 +291,10 @@ static sout_stream_id_sys_t *AddAudio( sout_stream_t *p_stream, es_format_t *p_f ...@@ -291,11 +291,10 @@ static sout_stream_id_sys_t *AddAudio( sout_stream_t *p_stream, es_format_t *p_f
return id; return id;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
VLC_UNUSED( p_stream ); VLC_UNUSED( p_stream );
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -133,10 +133,9 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -133,10 +133,9 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return (sout_stream_id_sys_t*)sout_MuxAddStream( p_stream->p_sys->p_mux, p_fmt ); return (sout_stream_id_sys_t*)sout_MuxAddStream( p_stream->p_sys->p_mux, p_fmt );
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_MuxDeleteStream( p_stream->p_sys->p_mux, (sout_input_t*)id ); sout_MuxDeleteStream( p_stream->p_sys->p_mux, (sout_input_t*)id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -68,7 +68,7 @@ static const char *ppsz_sout_options[] = { ...@@ -68,7 +68,7 @@ static const char *ppsz_sout_options[] = {
}; };
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * ); static int Send ( sout_stream_t *, sout_stream_id_sys_t *, block_t * );
struct sout_stream_sys_t struct sout_stream_sys_t
...@@ -187,7 +187,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt ) ...@@ -187,7 +187,7 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
return id; return id;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys; sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
...@@ -207,8 +207,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -207,8 +207,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
free( outputhash ); free( outputhash );
if( id->next_id ) sout_StreamIdDel( p_stream->p_next, id->next_id ); if( id->next_id ) sout_StreamIdDel( p_stream->p_next, id->next_id );
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
...@@ -234,7 +234,7 @@ static const char *const ppsz_sout_options[] = { ...@@ -234,7 +234,7 @@ static const char *const ppsz_sout_options[] = {
* Exported prototypes * Exported prototypes
*****************************************************************************/ *****************************************************************************/
static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * ); static sout_stream_id_sys_t *Add ( sout_stream_t *, es_format_t * );
static int Del ( sout_stream_t *, sout_stream_id_sys_t * ); static void Del ( sout_stream_t *, sout_stream_id_sys_t * );
static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* ); static int Send( sout_stream_t *, sout_stream_id_sys_t *, block_t* );
/***************************************************************************** /*****************************************************************************
...@@ -588,7 +588,7 @@ error: ...@@ -588,7 +588,7 @@ error:
return NULL; return NULL;
} }
static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) static void Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
{ {
sout_stream_sys_t *p_sys = p_stream->p_sys; sout_stream_sys_t *p_sys = p_stream->p_sys;
...@@ -628,8 +628,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id ) ...@@ -628,8 +628,6 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_sys_t *id )
id->p_encoder = NULL; id->p_encoder = NULL;
} }
free( id ); free( id );
return VLC_SUCCESS;
} }
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id, static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
......
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