	slist = ds2->p_role ?  &ds2->p_role->value.string_list : &ds1->p_role->value.string_list;
	if (slist->nb_items==1) {
		if (!strcmp(slist->vals[0], "main")) return GF_TRUE;
	}
	return GF_FALSE;
}

static u32 dasher_get_next_as_id(GF_DasherCtx *ctx)
{
	u32 check_id = 1;
	u32 i, count = gf_list_count(ctx->current_period->streams);
	for (i=0; i<count; i++) {
		GF_DashStream *ds = gf_list_get(ctx->current_period->streams, i);
		if (ds->as_id == check_id) {
	slist = ds2->p_role ?  &ds2->p_role->value.string_list : &ds1->p_role->value.string_list;
	if (slist->nb_items==1) {
		if (!strcmp(slist->vals[0], "main")) return GF_TRUE;
	}
	return GF_FALSE;
}

static u32 dasher_get_next_as_id(GF_DasherCtx *ctx)
{
	u32 check_id = 1;
	u32 i, count = gf_list_count(ctx->current_period->streams);
	for (i=0; i<count; i++) {
		GF_DashStream *ds = gf_list_get(ctx->current_period->streams, i);
		if (ds->as_id == check_id) {