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

illiminable at svn.xiph.org illiminable at svn.xiph.org
Sun Oct 16 00:16:17 PDT 2005


Author: illiminable
Date: 2005-10-16 00:16:12 -0700 (Sun, 16 Oct 2005)
New Revision: 10163

Modified:
   trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
Log:
* Change the default behaviour in libtemporaluri to handle npt 4 part time even when there is no npt prefix (is this valid?)

Modified: trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp
===================================================================
--- trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp	2005-10-15 17:36:05 UTC (rev 10162)
+++ trunk/oggdsf/src/lib/helper/libTemporalURI/C_TimeStamp.cpp	2005-10-16 07:16:12 UTC (rev 10163)
@@ -311,14 +311,36 @@
 
 		} else {
 			//Assume it's default numeric npt
-			bool locIsOK = parseSecsOnly(inTimeStamp);
-			if (locIsOK) {
-				mStampType = TS_NPT_SECS;
-				return true;
+			if (inTimeStamp.find(":") != string::npos) {
+				//We have four part time
+				sFourPartTime locFPT;
+				if ( parseNPT(inTimeStamp, &locFPT) ) {
+					mFPT = locFPT;
+					mStampType = TS_NPT_FULL;
+					return true;
+				} else {
+					mStampType = TS_NONE;
+					return false;
+				}
+				
 			} else {
-				mStampType = TS_NONE;
-				return false;
-			}	
+				bool locIsOK = parseSecsOnly(inTimeStamp);
+				if (locIsOK) {
+					mStampType = TS_NPT_SECS;
+					return true;
+				} else {
+					mStampType = TS_NONE;
+					return false;
+				}	
+			}
+			//bool locIsOK = parseSecsOnly(inTimeStamp);
+			//if (locIsOK) {
+			//	mStampType = TS_NPT_SECS;
+			//	return true;
+			//} else {
+			//	mStampType = TS_NONE;
+			//	return false;
+			//}	
 
 
 		}



More information about the commits mailing list