[xiph-commits] r8664 - trunk/oggdsf/src/lib/helper/libTemporalURI

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Fri Jan 7 08:40:36 PST 2005


Author: illiminable
Date: 2005-01-07 08:40:36 -0800 (Fri, 07 Jan 2005)
New Revision: 8664

Modified:
   trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
Log:
* Returning values is a good idea !

Modified: trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp	2005-01-07 16:33:57 UTC (rev 8663)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp	2005-01-07 16:40:36 UTC (rev 8664)
@@ -33,6 +33,7 @@
 				
 				if (locSubSec >= 0) {
 					inFPT->partials = locSubSec;
+					return true;
 				} else {
 					return false;
 				}
@@ -57,11 +58,14 @@
 				inFPT->partials = 0;
 				return true;
 			} else {
-				long locSubSec = StringHelper::stringToNum(locLeftOver);
+				long locSubSec = (long)StringHelper::stringToNum(locLeftOver);
 				
 				if (locSubSec >= 0) {
 					//TODO::: Verify frames < numframes for type.
 					inFPT->partials = locSubSec;
+					return true;
+				} else {
+					return false;
 				}
 			}
 		} else {
@@ -80,9 +84,9 @@
 	string locMins;
 	string locSecs;
 
-	long locHH = 0;
-	long locMM = 0;
-	long locSS = 0;
+	LOOG_INT64 locHH = 0;
+	LOOG_INT64 locMM = 0;
+	LOOG_INT64 locSS = 0;
 
 	if (locColonPos != string::npos) {
 		locHours = inTimeStamp.substr(0, locColonPos);
@@ -129,8 +133,8 @@
 
 		//Other wise, everything is ok.
 		inFPT->hours = locHH;
-		inFPT->minutes = locMM;
-		inFPT->seconds = locSS;
+		inFPT->minutes = (short)locMM;
+		inFPT->seconds = (short)locSS;
 		inFPT->partials = 0;
 		*outLeftOver = inTimeStamp;
 		return true;
@@ -157,6 +161,7 @@
 		//No dot here
 		locSS = StringHelper::stringToNum(inTimeStamp);
 		locNN = 0;
+		return true;
 	} else {
 		//Dotted time
 



More information about the commits mailing list