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

setid: do not clobber format

parent 862771a8
......@@ -188,30 +188,38 @@ static void Close( vlc_object_t * p_this )
static sout_stream_id_sys_t * AddId( sout_stream_t *p_stream, es_format_t *p_fmt )
{
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
es_format_t fmt;
if ( p_fmt->i_id == p_sys->i_id )
{
msg_Dbg( p_stream, "turning ID %d to %d",
p_sys->i_id, p_sys->i_new_id );
p_fmt->i_id = p_sys->i_new_id;
msg_Dbg( p_stream, "turning ID %d to %d", p_sys->i_id,
p_sys->i_new_id );
fmt = *p_fmt;
fmt.i_id = p_sys->i_new_id;
p_fmt = &fmt;
}
return p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
return sout_StreamIdAdd( p_stream->p_next, p_fmt );
}
static sout_stream_id_sys_t * AddLang( sout_stream_t *p_stream, es_format_t *p_fmt )
{
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
es_format_t fmt;
if ( p_fmt->i_id == p_sys->i_id )
{
msg_Dbg( p_stream, "turning language %s of ID %d to %s",
p_fmt->psz_language ? p_fmt->psz_language : "unk",
p_sys->i_id, p_sys->psz_language );
p_fmt->psz_language = strdup( p_sys->psz_language );
fmt = *p_fmt;
fmt.psz_language = p_sys->psz_language;
p_fmt = &fmt;
}
return p_stream->p_next->pf_add( p_stream->p_next, p_fmt );
return sout_StreamIdAdd( p_stream->p_next, p_fmt );
}
static void Del( 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