GF_Err parse_fracs(char *str, GF_Fraction64 *f, GF_Fraction64 *dur)
{
	GF_Err e = GF_OK;
	if (dur) {
		char *sep = strchr(str, '-');
		if (sep) {
			sep[0] = 0;
			if (!gf_parse_lfrac(str, f)) e = GF_BAD_PARAM;
			if (!gf_parse_lfrac(sep+1, dur)) e = GF_BAD_PARAM;
			sep[0] = '-';
			return e;
		}
		dur->num = 0;
		dur->den = 0;
	}
	if (!gf_parse_lfrac(str, f)) e = GF_BAD_PARAM;
	return e;
}
GF_Err parse_fracs(char *str, GF_Fraction64 *f, GF_Fraction64 *dur)
{
	GF_Err e = GF_OK;
	if (dur) {
		char *sep = strchr(str, '-');
		if (sep) {
			sep[0] = 0;
			if (!gf_parse_lfrac(str, f)) e = GF_BAD_PARAM;
			if (!gf_parse_lfrac(sep+1, dur)) e = GF_BAD_PARAM;
			sep[0] = '-';
			return e;
		}
		dur->num = 0;
		dur->den = 0;
	}
	if (!gf_parse_lfrac(str, f)) e = GF_BAD_PARAM;
	return e;
}