+ config_ChainParse( p_vout, CFG_PREFIX, ppsz_filter_options,
+ p_vout->p_cfg );
+
+ psz_clonelist = var_CreateGetNonEmptyString( p_vout,
+ CFG_PREFIX "vout-list" );
+ if( psz_clonelist )
+ {
+ int i_dummy;
+ char *psz_token;
+
+ /* Count the number of defined vout */
+ p_vout->p_sys->i_clones = 1;
+ i_dummy = 0;
+ while( psz_clonelist[i_dummy] != 0 )
+ {
+ if( psz_clonelist[i_dummy] == VOUTSEPARATOR )
+ p_vout->p_sys->i_clones++;
+ i_dummy++;
+ }
+
+ 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;
+ }