- /* Look what method was requested */
- p_vout->p_sys->i_clones = config_GetInt( p_vout, "clone-count" );
+ p_vout->p_sys->ppsz_vout_list = malloc( p_vout->p_sys->i_clones
+ * sizeof(char *) );
+ if( !p_vout->p_sys->ppsz_vout_list )
+ {
+ free( psz_clonelist );
+ free( p_vout->p_sys );
+ return VLC_ENOMEM;
+ }
+
+ /* Tokenize the list */
+ i_dummy = 0;
+ psz_token = psz_clonelist;
+ while( psz_token && *psz_token )
+ {
+ char *psz_module;
+ psz_module = psz_token;
+ psz_token = strchr( psz_module, VOUTSEPARATOR );
+ if( psz_token )
+ {
+ *psz_token = '\0';
+ psz_token++;
+ }
+ p_vout->p_sys->ppsz_vout_list[i_dummy] = strdup( psz_module );
+ i_dummy++;
+ }
+
+ free( psz_clonelist );
+ }
+ else
+ {
+ /* No list was specified. We will use the default vout, and get
+ * the number of clones from clone-count */
+ p_vout->p_sys->i_clones =
+ var_CreateGetInteger( p_vout, CFG_PREFIX "count" );
+ p_vout->p_sys->ppsz_vout_list = NULL;
+ }