[xiph-commits] r8001 - in trunk/oggdsf/src/lib: codecs/flac/libs/libFLACHelper core/directshow/dsfOggDemux core/ogg/libOOOggSeek

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Thu Oct 14 10:21:46 PDT 2004


Author: illiminable
Date: 2004-10-14 10:21:46 -0700 (Thu, 14 Oct 2004)
New Revision: 8001

Modified:
   trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggFLAC_1_0_Stream.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp
   trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
Log:
* Fixed the flac stuff up. Plays new flac and flac classic, encodes to new flac.

Modified: trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp	2004-10-14 15:54:50 UTC (rev 8000)
+++ trunk/oggdsf/src/lib/codecs/flac/libs/libFLACHelper/FLACHeaderTweaker.cpp	2004-10-14 17:21:46 UTC (rev 8001)
@@ -63,7 +63,7 @@
 	locFirstPackBuff[5] = 1;
 	locFirstPackBuff[6] = 0;
 	locFirstPackBuff[7] = 0; //Num header HIGH BYTE
-	locFirstPackBuff[8] = mOldHeaderList.size() - 1; //Num headers LOW BYTE
+	locFirstPackBuff[8] = mOldHeaderList.size() - 2; //Num headers LOW BYTE
 	locFirstPackBuff[9] = 'f';
 	locFirstPackBuff[10] = 'L';
 	locFirstPackBuff[11] = 'a';

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggFLAC_1_0_Stream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggFLAC_1_0_Stream.cpp	2004-10-14 15:54:50 UTC (rev 8000)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggFLAC_1_0_Stream.cpp	2004-10-14 17:21:46 UTC (rev 8001)
@@ -59,7 +59,7 @@
 	//NEW::: Since the ogg flac 1.0 mapping there's now another option... if the new first header
 	// specifies the number of headers, we can count directly, otherwise we stll use the old
 	// method for maximum compatability.
-	mNumHeadersNeeded = iBE_Math::charArrToUShort(inOggPacket->packetData() + 7) - 1;
+	mNumHeadersNeeded = iBE_Math::charArrToUShort(inOggPacket->packetData() + 7);
 	debugLog<<"Num FLAC Headers needed = "<<mNumHeadersNeeded<<endl;
 	if (mNumHeadersNeeded == 0) {
 		//Variable number

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp	2004-10-14 15:54:50 UTC (rev 8000)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp	2004-10-14 17:21:46 UTC (rev 8001)
@@ -50,8 +50,8 @@
 	
 	//Need to do something here !
 	mSerialNo = inBOSPage->header()->StreamSerialNo();
-	//string locLogName = "G:\\logs\\oggstream" + StringHelper::numToString(mSerialNo) + ".log";
-	//debugLog.open(locLogName.c_str(), ios_base::out);
+	string locLogName = "G:\\logs\\oggstream" + StringHelper::numToString(mSerialNo) + ".log";
+	debugLog.open(locLogName.c_str(), ios_base::out);
 	mStreamLock = new CCritSec;
 	//This may need to be moved to derived class
 	//Yep, Sure did !

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-10-14 15:54:50 UTC (rev 8000)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp	2004-10-14 17:21:46 UTC (rev 8001)
@@ -119,7 +119,7 @@
 			debugLog<<"Identified new flac..."<<endl;
 			//mPacketCount--;
 			//POTENTIAL BUG::: Only looks at low order byte
-			mNumHeaders = inOggPage->getPacket(0)->packetData()[8];
+			mNumHeaders = inOggPage->getPacket(0)->packetData()[8] + 1;
 			debugLog<<"Header says there are this many headers "<<mNumHeaders<<endl;
 			mSerialNoToTrack = inOggPage->header()->StreamSerialNo();
 			if (mNumHeaders == 0) {



More information about the commits mailing list