Commit b4559487 authored by Francois Cartegnie's avatar Francois Cartegnie

es_out_timeshift: use switch for CmdCleanControl

parent a3d9425c
......@@ -1513,22 +1513,26 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
}
static void CmdCleanControl( ts_cmd_t *p_cmd )
{
if( ( p_cmd->u.control.i_query == ES_OUT_SET_GROUP_META ||
p_cmd->u.control.i_query == ES_OUT_SET_META ) &&
p_cmd->u.control.u.int_meta.p_meta )
switch( p_cmd->u.control.i_query )
{
vlc_meta_Delete( p_cmd->u.control.u.int_meta.p_meta );
}
else if( p_cmd->u.control.i_query == ES_OUT_SET_GROUP_EPG &&
p_cmd->u.control.u.int_epg.p_epg )
{
vlc_epg_Delete( p_cmd->u.control.u.int_epg.p_epg );
}
else if( p_cmd->u.control.i_query == ES_OUT_SET_ES_FMT &&
p_cmd->u.control.u.es_fmt.p_fmt )
{
es_format_Clean( p_cmd->u.control.u.es_fmt.p_fmt );
free( p_cmd->u.control.u.es_fmt.p_fmt );
case ES_OUT_SET_GROUP_META:
case ES_OUT_SET_META:
if( p_cmd->u.control.u.int_meta.p_meta )
vlc_meta_Delete( p_cmd->u.control.u.int_meta.p_meta );
break;
case ES_OUT_SET_GROUP_EPG:
if( p_cmd->u.control.u.int_epg.p_epg )
vlc_epg_Delete( p_cmd->u.control.u.int_epg.p_epg );
break;
case ES_OUT_SET_ES_FMT:
if( p_cmd->u.control.u.es_fmt.p_fmt )
{
es_format_Clean( p_cmd->u.control.u.es_fmt.p_fmt );
free( p_cmd->u.control.u.es_fmt.p_fmt );
}
// ft
default:
break;
}
}
......
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