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

autodel: fix format copy

parent 63305f38
......@@ -115,8 +115,11 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
{
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
sout_stream_id_sys_t *p_es = malloc( sizeof(sout_stream_id_sys_t) );
if( unlikely(p_es == NULL) )
return NULL;
es_format_Copy( &p_es->fmt, p_fmt );
p_es->fmt = *p_fmt;
p_es->id = NULL;
p_es->i_last = VLC_TS_INVALID;
p_es->b_error = false;
......@@ -128,13 +131,13 @@ static sout_stream_id_sys_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
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_id_sys_t *id = p_es->id;
if( p_es->id != NULL )
sout_StreamIdDel( p_stream->p_next, p_es->id );
TAB_REMOVE( p_sys->i_es_num, p_sys->pp_es, p_es );
es_format_Clean( &p_es->fmt );
free( p_es );
if ( id != NULL )
p_stream->p_next->pf_del( p_stream->p_next, id );
}
static int Send( sout_stream_t *p_stream, sout_stream_id_sys_t *p_es,
......
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