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 ) ...@@ -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 ) static void CmdCleanControl( ts_cmd_t *p_cmd )
{ {
if( ( p_cmd->u.control.i_query == ES_OUT_SET_GROUP_META || switch( p_cmd->u.control.i_query )
p_cmd->u.control.i_query == ES_OUT_SET_META ) &&
p_cmd->u.control.u.int_meta.p_meta )
{ {
vlc_meta_Delete( p_cmd->u.control.u.int_meta.p_meta ); case ES_OUT_SET_GROUP_META:
} case ES_OUT_SET_META:
else if( p_cmd->u.control.i_query == ES_OUT_SET_GROUP_EPG && if( p_cmd->u.control.u.int_meta.p_meta )
p_cmd->u.control.u.int_epg.p_epg ) vlc_meta_Delete( p_cmd->u.control.u.int_meta.p_meta );
{ break;
vlc_epg_Delete( p_cmd->u.control.u.int_epg.p_epg ); case ES_OUT_SET_GROUP_EPG:
} if( p_cmd->u.control.u.int_epg.p_epg )
else if( p_cmd->u.control.i_query == ES_OUT_SET_ES_FMT && vlc_epg_Delete( p_cmd->u.control.u.int_epg.p_epg );
p_cmd->u.control.u.es_fmt.p_fmt ) break;
{ case ES_OUT_SET_ES_FMT:
es_format_Clean( p_cmd->u.control.u.es_fmt.p_fmt ); if( p_cmd->u.control.u.es_fmt.p_fmt )
free( 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