s->pf_peek = DStreamPeek;
s->pf_control= DStreamControl;
- s->i_char_width = 1;
- s->b_little_endian = false;
-
s->p_sys = malloc( sizeof( d_stream_sys_t) );
if( s->p_sys == NULL )
{
- vlc_object_release( s );
+ stream_CommonDelete( s );
return NULL;
}
p_sys = (d_stream_sys_t*)s->p_sys;
/* decoder fifo */
if( ( p_sys->p_fifo = block_FifoNew() ) == NULL )
{
- vlc_object_release( s );
+ stream_CommonDelete( s );
free( p_sys->psz_name );
free( p_sys );
return NULL;
if( vlc_thread_create( s, "stream out", DStreamThread,
VLC_THREAD_PRIORITY_INPUT, false ) )
{
- vlc_object_release( s );
+ stream_CommonDelete( s );
free( p_sys->psz_name );
free( p_sys );
return NULL;
if( p_block ) block_FifoPut( p_sys->p_fifo, p_block );
}
+/* FIXME why is it needed ?
+ * We may be able to use pf_destroy
+ */
void stream_DemuxDelete( stream_t *s )
{
d_stream_sys_t *p_sys = (d_stream_sys_t*)s->p_sys;
free( p_sys->psz_name );
free( p_sys );
- vlc_object_release( s );
+ stream_CommonDelete( s );
}