	if (ctx->check_main_role && !main_role_set) {
		GF_MPD_Descriptor *desc;
		desc = gf_mpd_descriptor_new(NULL, "urn:mpeg:dash:role:2011", "main");
		gf_list_add(set->role, desc);
	}
}

static void rewrite_dep_ids(GF_DasherCtx *ctx, GF_DashStream *base_ds)
{
	u32 i, count = gf_list_count(ctx->pids);
	for (i=0; i<count; i++) {
		GF_DashStream *ds = gf_list_get(ctx->pids, i);
		if (ds->src_id != base_ds->src_id) continue;
		if (!ds->dep_id || !ds->rep) continue;
	if (ctx->check_main_role && !main_role_set) {
		GF_MPD_Descriptor *desc;
		desc = gf_mpd_descriptor_new(NULL, "urn:mpeg:dash:role:2011", "main");
		gf_list_add(set->role, desc);
	}
}

static void rewrite_dep_ids(GF_DasherCtx *ctx, GF_DashStream *base_ds)
{
	u32 i, count = gf_list_count(ctx->pids);
	for (i=0; i<count; i++) {
		GF_DashStream *ds = gf_list_get(ctx->pids, i);
		if (ds->src_id != base_ds->src_id) continue;
		if (!ds->dep_id || !ds->rep) continue;