[xiph-commits] r8046 - in trunk/oggdsf/src:
lib/core/directshow/dsfAnxDemux
lib/core/directshow/dsfOggDemux lib/core/directshow/dsfOggMux
lib/core/ogg/libOOOgg lib/core/ogg/libOOOggSeek
lib/core/ogg/libVorbisComment tests/testMuxDemux tools/OOOggValidate
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Sun Oct 17 11:29:03 PDT 2004
Author: illiminable
Date: 2004-10-17 11:29:02 -0700 (Sun, 17 Oct 2004)
New Revision: 8046
Modified:
trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPacketiser.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
trunk/oggdsf/src/lib/core/ogg/libVorbisComment/FileComments.cpp
trunk/oggdsf/src/tests/testMuxDemux/OggPageFileWriter.cpp
trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp
Log:
* Fixed a major memory leak in the packetiser.
* Validated memory use of all IOggCallback interface implementations.
* Valdated memory use of all IStampedOggPacketSink interface implementations.
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxStreamMapper.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -59,7 +59,7 @@
}
return locWasAny && retVal;
}
-bool AnxStreamMapper::acceptOggPage(OggPage* inOggPage)
+bool AnxStreamMapper::acceptOggPage(OggPage* inOggPage) //Deletes or gives away page.
{
//ANXTOFIX::: This was changed in the ogg demux.
//DONE:::
@@ -86,7 +86,7 @@
char* locStr = (char*)(inOggPage->getPacket(0)->packetData() + 28);
if (strstr(locStr, "text/x-cmml") != NULL) {
mSeenCMML = true;
- OggStream* locStream = new CMMLStream(inOggPage, mOwningFilter, true);//OggStreamFactory::CreateStream(inOggPage, mOwningFilter);
+ OggStream* locStream = new CMMLStream(inOggPage, mOwningFilter, true); //The page is only given for viewing
if (locStream != NULL) {
mStreamList.push_back(locStream);
}
@@ -105,9 +105,11 @@
mReadyForCodecs = true;
} else {
//ERROR... got an EOS before we've seen the annodex BOS
+ delete inOggPage;
return false;
}
}
+ delete inOggPage;
return true;
} else {
vector<unsigned long>::iterator it;
@@ -123,6 +125,7 @@
mStreamList.push_back(locStream);
}
mSeenStreams.erase(it);
+ delete inOggPage;
return true;
}
}
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -692,7 +692,7 @@
}
//IOggCallback Interface
-bool OggDemuxSourceFilter::acceptOggPage(OggPage* inOggPage) {
+bool OggDemuxSourceFilter::acceptOggPage(OggPage* inOggPage) { //Gives away page.
return mStreamMapper->acceptOggPage(inOggPage);
}
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -217,7 +217,7 @@
//debugLog<<"*************************** ERROR ERROR ERROR **********************"<<endl;
mLastEndGranulePos = inGranPos;
}
-bool OggStream::acceptOggPage(OggPage* inOggPage) {
+bool OggStream::acceptOggPage(OggPage* inOggPage) { //Gives away page.
debugLog<<"Accepting ogg page..."<<endl;
//Chaining hack for icecast.
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStreamMapper.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -58,13 +58,13 @@
}
//Sends the page to *only one* stream if it matches the serial number.
-bool OggStreamMapper::dispatchPage(OggPage* inOggPage)
+bool OggStreamMapper::dispatchPage(OggPage* inOggPage) //Gives away or deletes page.
{
for (unsigned long i = 0; i < mStreamList.size(); i++) {
if (mStreamList[i]->serialNo() == inOggPage->header()->StreamSerialNo()) {
//This is the correct stream
//DbgLog((LOG_TRACE, 2, TEXT("Mapper : Dispatching page to serial %u",inOggPage->header()->StreamSerialNo())));
- return mStreamList[i]->acceptOggPage(inOggPage);
+ return mStreamList[i]->acceptOggPage(inOggPage); //Give away page.
}
}
@@ -76,16 +76,17 @@
//Only attempt a chain for a single stream (probably vorbis only)
if (mStreamList.size() == 1) {
mStreamList[0]->setSerialNo(inOggPage->header()->StreamSerialNo());
- return mStreamList[0]->acceptOggPage(inOggPage);
+ return mStreamList[0]->acceptOggPage(inOggPage); //Give away page.
}
//return false;
+ delete inOggPage; //Delete page.
return true;
}
unsigned long OggStreamMapper::startOfData() {
return mDataStartsAt;
}
-bool OggStreamMapper::acceptOggPage(OggPage* inOggPage)
+bool OggStreamMapper::acceptOggPage(OggPage* inOggPage) //Gives away page.
{
//FIXED::: Data starts a 0.
@@ -117,7 +118,7 @@
return true;
//TODO::: Shuold verify the mapper doesn';t already have a stream with this number !
} else {
- return dispatchPage(inOggPage);
+ return dispatchPage(inOggPage); //Gives away page.
}
}
bool OggStreamMapper::toStartOfData() {
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxFilter.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -148,11 +148,12 @@
return S_OK;
}
-bool OggMuxFilter::acceptOggPage(OggPage* inOggPage) {
+bool OggMuxFilter::acceptOggPage(OggPage* inOggPage) { //Deletes Page correctly.
//debugLog<<"Page accepted... writing..."<<endl;
unsigned char* locPageData = inOggPage->createRawPageData();
mOutputFile.write((char*)locPageData, inOggPage->pageSize());
+ delete inOggPage;
delete[] locPageData;
return true;
}
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggMux/OggMuxInputPin.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -231,7 +231,7 @@
mPaginator.setNumHeaders((locHeadPack->packetData()[8]) + 1);
delete locHeadPack;
}
- mPaginator.acceptStampedOggPacket(locFLACSplitter->getHeader(i));
+ mPaginator.acceptStampedOggPacket(locFLACSplitter->getHeader(i)); //This get function returns our copy which we give away.
debugLog<<"After paginator feed..."<<endl;
}
mNeedsFLACHeaderTweak = false;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggDataBuffer.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -111,7 +111,7 @@
//Fire off the oggpage to whoever is registered to get it
if (mVirtualCallback != NULL) {
- if (mVirtualCallback->acceptOggPage(inOggPage) == true) {
+ if (mVirtualCallback->acceptOggPage(inOggPage) == true) { //Page given away, never used again.
return DISPATCH_OK;
} else {
return DISPATCH_FALSE;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggMuxStream.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -46,12 +46,12 @@
OggMuxStream::~OggMuxStream(void)
{
- //Need to delete the contents of the queue later.
+ //LEAK::: Need to delete the contents of the queue later.
}
-bool OggMuxStream::acceptOggPage(OggPage* inOggPage) {
+bool OggMuxStream::acceptOggPage(OggPage* inOggPage) { //Holds page for later... still needs deleting in destructor
mIsEOS = false;
- mPageQueue.push_back(inOggPage->clone());
+ mPageQueue.push_back(inOggPage); //AOP::: Clone not required.
mNotifier->notifyArrival();
return true;
}
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPacketiser.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPacketiser.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPacketiser.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -47,7 +47,7 @@
mCurrentGranPos = 0;
return true;
}
-bool OggPacketiser::acceptOggPage(OggPage* inOggPage) {
+bool OggPacketiser::acceptOggPage(OggPage* inOggPage) { //AOP::: Needs closer look
//All callers to acceptOggPage give away their pointer
// to this function. All functions implementing this interface
// are responsible for deleting this page. All callers
@@ -114,6 +114,7 @@
//Deliver the packet to the packet sink...
if (dispatchStampedOggPacket(mPendingPacket) == false) {
//debugLog<<"acceptOggPage : DELIVERY FAILED !"<<endl;
+ delete inOggPage;
return false;
}
//debugLog<<"acceptOggPage : ... delivery sucessful..."<<endl;
@@ -130,6 +131,7 @@
//debugLog<<"acceptOggPage : INTERNAL ERROR - Header says cont but packet doesn't."<<endl;
//Header flag says continuation but first packet is not continued.
mPacketiserState = PKRSTATE_INVALID_STREAM;
+ delete inOggPage;
throw 0;
}
} else {
@@ -144,6 +146,7 @@
//TODO::: Should really return false here if this returns false.
if( processPage(inOggPage, false, false) == false) {
//TODO::: State change ???
+ delete inOggPage;
return false;
}
} else {
@@ -158,6 +161,7 @@
//Is this something ?
//UNKNOWN CASE::: Header continuation flag set, but no packets on page.
mPacketiserState = PKRSTATE_INVALID_STREAM;
+ delete inOggPage;
throw 0;
}
} else {
@@ -172,7 +176,7 @@
if (inOggPage->getPacket(0)->isTruncated()) {
//debugLog<<"acceptOggPage : ...and it's truncated... so we save it."<<endl;
//ASSERT : mPending packet is NULL, because this is not a continuation page.
- mPendingPacket = (StampedOggPacket*)inOggPage->getPacket(0);
+ mPendingPacket = (StampedOggPacket*)inOggPage->getStampedPacket(0)->clone();
//debugLog<<"acceptOggPage : Moving to CONT state."<<endl;
mPacketiserState = PKRSTATE_AWAITING_CONTINUATION;
@@ -181,6 +185,7 @@
if (processPage(inOggPage, true, true) == false ) { //If there was only one pack process it.
//debugLog<<"acceptOggPage : FAIL STATE DELIVERY"<<endl;
//TODO::: State change
+ delete inOggPage;
return false;
}
@@ -191,6 +196,7 @@
if (processPage(inOggPage, true, false) == false ) { //If there was only one packet, no packets would be written
//debugLog<<"acceptOggPage : FAIL STATE DELIVERY"<<endl;
//TODO::: State change
+ delete inOggPage;
return false;
}
}
@@ -232,6 +238,7 @@
if ( dispatchStampedOggPacket( (StampedOggPacket*)(inOggPage->getStampedPacket(inOggPage->numPackets() - 1)->clone()) ) == false ) {
//debugLog<<"acceptOggPage : Delivery failed..."<<endl;
//TODO::: State change ?
+ delete inOggPage;
return false;
}
//The last packet is complete. So send it.
@@ -250,11 +257,13 @@
//This is more likely to be due to inconsistency of state code than invalidaity
// of file.
mPacketiserState = PKRSTATE_INVALID_STREAM;
+ delete inOggPage;
throw 0;
} else {
//debugLog<<"acceptOggPage : NEVER BE HERE 2"<<endl;
//Shouldn't be here
mPacketiserState = PKRSTATE_INVALID_STREAM;
+ delete inOggPage;
throw 0;
}
} else {
@@ -262,6 +271,7 @@
//Zero packets on page.
}
//debugLog<<"acceptOggPage : All ok... returning..."<<endl<<endl;
+ delete inOggPage;
return true;
}
@@ -275,7 +285,7 @@
i++)
{
//debugLog<<"processPage : Packet "<< i <<endl;
- locIsOK = (locIsOK && dispatchStampedOggPacket(inOggPage->getStampedPacket(i)));
+ locIsOK = (locIsOK && dispatchStampedOggPacket((StampedOggPacket*)inOggPage->getStampedPacket(i)->clone())); //Gives away new packet.
if (!locIsOK) {
//debugLog<<"processPage : FAIL STATE"<<endl;
//TODO::: State change ???
@@ -287,12 +297,13 @@
}
-bool OggPacketiser::dispatchStampedOggPacket(StampedOggPacket* inPacket) {
+bool OggPacketiser::dispatchStampedOggPacket(StampedOggPacket* inPacket) { //Accepts packet... and gives it away or deletes it.
if (mNumIgnorePackets > 0) {
//Ignore this packet.
mNumIgnorePackets--;
- //MEMCHECK::: Should probably delete this packet here.
+ //MEMCHECK::: Should probably delete this packet here.]
+ delete inPacket;
return true;
} else {
//Modify the header packet to include the gran pos of previous page.
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPageInterleaver.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -145,7 +145,7 @@
throw 0;
} else {
//debugLog<<"writeLowest : Writing..."<<endl;
- mFileWriter->acceptOggPage(locLowestStream->popFront());
+ mFileWriter->acceptOggPage(locLowestStream->popFront()); //Gives away page
}
}
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -134,7 +134,7 @@
return true;
}
-bool OggPaginator::acceptStampedOggPacket(StampedOggPacket* inOggPacket) {
+bool OggPaginator::acceptStampedOggPacket(StampedOggPacket* inOggPacket) { //Keeps packet.
//unsigned long locPotentialSize = mCurrentPageSize + inOggPacket->packetSize();
//bool locCouldWriteNow = false;
@@ -256,7 +256,8 @@
setChecksum();
//TODO::: Should catch and propagate return value.
- mPageCallback->acceptOggPage(mPendingPage);
+ mPageCallback->acceptOggPage(mPendingPage); //Gives away page.
+ mPendingPage = NULL;
createFreshPage();
return true;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -56,7 +56,7 @@
//mStampType =inStampType;
}
-void StampedOggPacket::merge(StampedOggPacket* inMorePacket) {
+void StampedOggPacket::merge(const StampedOggPacket* inMorePacket) {
//Make a new buffer the size of both data segs together
unsigned char* locBuff = new unsigned char[mPacketSize + inMorePacket->mPacketSize]; //Stored in the member var and deleted by base destructor
@@ -77,7 +77,7 @@
//Don't copy start stamp, keep the current packets start stamp.
//mStartTime = inMorePacket->startTime();
//
- mEndTime = inMorePacket->endTime();
+ mEndTime = inMorePacket->mEndTime;
mStampType = inMorePacket->mStampType;
//---::: Changed, uses two flags no.
@@ -85,7 +85,7 @@
//mIsComplete = inMorePacket->mIsComplete;
//The new packet is truncated only if the incoming packet is
- mIsTruncated = inMorePacket->isTruncated();
+ mIsTruncated = inMorePacket->mIsTruncated;
//This is not a continuation... a continuation is a packet that does not start at the start of the real packet.
mIsContinuation = false;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/StampedOggPacket.h 2004-10-17 18:29:02 UTC (rev 8046)
@@ -61,7 +61,7 @@
void StampedOggPacket::setTimeStamp(__int64 inStartTime, __int64 inEndTime, StampedOggPacket::eStampType inStampType);
//Merge function
- virtual void merge(StampedOggPacket* inMorePacket);
+ virtual void merge(const StampedOggPacket* inMorePacket);
protected:
__int64 mStartTime;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoAnxSeekTable.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -24,9 +24,11 @@
mAnnodexSerialNo = inOggPage->header()->StreamSerialNo();
mSeenAnything = true;
mFilePos += inOggPage->pageSize();
+ delete inOggPage;
return true;
//Need to grab other info here.
} else {
+ delete inOggPage;
return false;
}
}
@@ -35,6 +37,7 @@
//This is the EOS o the annodex section... everything that follows is ogg like
mReadyForOgg = true;
mFilePos += inOggPage->pageSize();
+ delete inOggPage;
return true;
}
@@ -51,14 +54,15 @@
if (mSkippedCMML == false) {
mSkippedCMML = true;
mFilePos += inOggPage->pageSize();
+ delete inOggPage;
return true;
} else {
- return AutoOggSeekTable::acceptOggPage(inOggPage);
+ return AutoOggSeekTable::acceptOggPage(inOggPage); //Gives away page.
}
} else {
mFilePos += inOggPage->pageSize();
}
-
+ delete inOggPage;
return true;
}
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/AutoOggSeekTable.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -64,7 +64,7 @@
delete mOggDemux;
}
-bool AutoOggSeekTable::acceptOggPage(OggPage* inOggPage) {
+bool AutoOggSeekTable::acceptOggPage(OggPage* inOggPage) { //Correctly deletes page.
//TODO ::: Some of this could be shared from other places.
Modified: trunk/oggdsf/src/lib/core/ogg/libVorbisComment/FileComments.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libVorbisComment/FileComments.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/lib/core/ogg/libVorbisComment/FileComments.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -41,7 +41,7 @@
{
}
-bool FileComments::acceptOggPage(OggPage* inOggPage) {
+bool FileComments::acceptOggPage(OggPage* inOggPage) { //Correctly deletes page.
//Get a callback... check whether we have a comment.
VorbisComments* locVorbisComments = NULL;
StreamCommentInfo* locStreamInfo = NULL;
@@ -79,6 +79,7 @@
}
mBytePos += inOggPage->pageSize();
+ delete inOggPage;
return true;
}
Modified: trunk/oggdsf/src/tests/testMuxDemux/OggPageFileWriter.cpp
===================================================================
--- trunk/oggdsf/src/tests/testMuxDemux/OggPageFileWriter.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/tests/testMuxDemux/OggPageFileWriter.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -14,6 +14,8 @@
unsigned char* locPageBytes = inOggPage->createRawPageData();
mFile.write((const char*) locPageBytes, inOggPage->pageSize());
+
+ delete inOggPage;
delete [] locPageBytes;
return true;
}
\ No newline at end of file
Modified: trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp
===================================================================
--- trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp 2004-10-17 17:12:14 UTC (rev 8045)
+++ trunk/oggdsf/src/tools/OOOggValidate/OggValidationState.cpp 2004-10-17 18:29:02 UTC (rev 8046)
@@ -130,7 +130,7 @@
bool OggValidationState::isValid() {
return mIsValid;
}
-bool OggValidationState::acceptOggPage(OggPage* inOggPage) {
+bool OggValidationState::acceptOggPage(OggPage* inOggPage) { //AOP:::Needs validation
//Validate the page header
More information about the commits
mailing list