			prev_p->duration = 0;
		}
		p_start += p->duration;
		prev_p = p;
	}
}

static void dasher_transfer_file(FILE *f, GF_FilterPid *opid, const char *name, GF_DashStream *ds)
{
	GF_FilterPacket *pck;
	u32 size, nb_read;
	u8 *output;

	size = (u32) gf_fsize(f);

	pck = gf_filter_pck_new_alloc(opid, size, &output);
	if (!pck) return;

	nb_read = (u32) gf_fread(output, size, f);
	if (nb_read != size) {
		GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("[Dasher] Error reading temp MPD file, read %d bytes but file size is %d\n", nb_read, size ));
	}

	gf_filter_pck_set_framing(pck, GF_TRUE, GF_TRUE);
	gf_filter_pck_set_seek_flag(pck, GF_TRUE);
	if (name) {
			prev_p->duration = 0;
		}
		p_start += p->duration;
		prev_p = p;
	}
}

static void dasher_transfer_file(FILE *f, GF_FilterPid *opid, const char *name, GF_DashStream *ds)
{
	GF_FilterPacket *pck;
	u32 size, nb_read;
	u8 *output;

	size = (u32) gf_fsize(f);

	pck = gf_filter_pck_new_alloc(opid, size, &output);
	if (!pck) return;

	nb_read = (u32) gf_fread(output, size, f);
	if (nb_read != size) {
		GF_LOG(GF_LOG_ERROR, GF_LOG_DASH, ("[Dasher] Error reading temp MPD file, read %d bytes but file size is %d\n", nb_read, size ));
	}

	gf_filter_pck_set_framing(pck, GF_TRUE, GF_TRUE);
	gf_filter_pck_set_seek_flag(pck, GF_TRUE);
	if (name) {