		}

		//open PID
		dasher_open_pid(filter, ctx, ds, multi_pids, skip_init);
	}
}

static void dasher_purge_segment_timeline(GF_DashStream *ds, GF_MPD_SegmentTimeline *stl, GF_DASH_SegmentContext *sctx)
{
	GF_MPD_SegmentTimelineEntry *stl_e = gf_list_get(stl->entries, 0);
	if (!stl_e) return;

	if (stl_e->repeat_count) {
		stl_e->repeat_count--;
		stl_e->start_time += stl_e->duration;
	} else {
		u64 start_time = stl_e->start_time + stl_e->duration;
		gf_list_rem(stl->entries, 0);
		gf_free(stl_e);
		stl_e = gf_list_get(stl->entries, 0);
		if (!stl_e) {
			GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("[Dasher] No timeline entry after currently removed segment, cannot update start time\n" ));
			return;
		}
		}

		 
		dasher_open_pid(filter, ctx, ds, multi_pids, skip_init);
	}
}

static void dasher_purge_segment_timeline(GF_DashStream *ds, GF_MPD_SegmentTimeline *stl, GF_DASH_SegmentContext *sctx)
{
	GF_MPD_SegmentTimelineEntry *stl_e = gf_list_get(stl->entries, 0);
	if (!stl_e) return;

	if (stl_e->repeat_count) {
		stl_e->repeat_count--;
		stl_e->start_time += stl_e->duration;
	} else {
		u64 start_time = stl_e->start_time + stl_e->duration;
		gf_list_rem(stl->entries, 0);
		gf_free(stl_e);
		stl_e = gf_list_get(stl->entries, 0);
		if (!stl_e) {
			GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("[Dasher] No timeline entry after currently removed segment, cannot update start time\n" ));
			return;
		}