[xiph-commits] r8049 - in trunk/oggdsf/src/lib/core/directshow: dsfAbstractAudioDecoder dsfAbstractAudioEncoder dsfAnxDemux dsfOggDemux

illiminable at motherfish-iii.xiph.org illiminable at motherfish-iii.xiph.org
Sun Oct 17 12:13:14 PDT 2004


Author: illiminable
Date: 2004-10-17 12:13:14 -0700 (Sun, 17 Oct 2004)
New Revision: 8049

Modified:
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxDemuxSourceFilter.h
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
   trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggFLAC_1_0_Stream.cpp
Log:
* More leaks, more virtuals.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.cpp	2004-10-17 18:58:17 UTC (rev 8048)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeFilter.cpp	2004-10-17 19:13:14 UTC (rev 8049)
@@ -37,7 +37,7 @@
 		mAudioFormat(inAudioFormat)
 	
 {
-	m_pLock = new CCritSec;
+	m_pLock = new CCritSec;		//Deleted in destructor... check what is happening in the base class.
 }
 
 AbstractAudioDecodeFilter::~AbstractAudioDecodeFilter(void)

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp	2004-10-17 18:58:17 UTC (rev 8048)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioDecoder/AbstractAudioDecodeInputPin.cpp	2004-10-17 19:13:14 UTC (rev 8049)
@@ -50,7 +50,7 @@
 	//ConstructCodec();
 	//debugLog.open("g:\\logs\\aad.log", ios_base::out);
 	mAcceptableMediaType = inAcceptMediaType;
-	mStreamLock = new CCritSec;
+	mStreamLock = new CCritSec;			//Deleted in destructor.
 
 	//This is causing a problem... since every addref on a pin automatically
 	// adds a ref to the filter... we get the situation, where on shutdown

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp	2004-10-17 18:58:17 UTC (rev 8048)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractAudioEncoder/AbstractAudioEncodeOutputPin.cpp	2004-10-17 19:13:14 UTC (rev 8049)
@@ -137,7 +137,7 @@
 			outMediaType->SetSubtype(&(mOutputMediaType->subtype));
 			outMediaType->SetFormatType(&(mOutputMediaType->formattype));
 			//
-			locFormatBuffer = new BYTE[FormatBufferSize()];
+			locFormatBuffer = new BYTE[FormatBufferSize()];			//Deleted below. Is this right ? What does set format do ?
 			FillFormatBuffer(locFormatBuffer);
 			outMediaType->SetFormat(locFormatBuffer, FormatBufferSize());
 			delete[] locFormatBuffer;

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxDemuxSourceFilter.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxDemuxSourceFilter.h	2004-10-17 18:58:17 UTC (rev 8048)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxDemux/AnxDemuxSourceFilter.h	2004-10-17 19:13:14 UTC (rev 8049)
@@ -49,7 +49,7 @@
 public:
 	friend class CMMLStream;
 	AnxDemuxSourceFilter(void);
-	~AnxDemuxSourceFilter(void);
+	virtual ~AnxDemuxSourceFilter(void);
 
 	static CUnknown* WINAPI AnxDemuxSourceFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
 

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-10-17 18:58:17 UTC (rev 8048)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-10-17 19:13:14 UTC (rev 8049)
@@ -159,6 +159,7 @@
 	
 	delete mStreamMapper;
 	
+	
 	mStreamMapper = NULL;
 
 	
@@ -166,6 +167,7 @@
 		//DbgLog((LOG_ERROR, 1, TEXT("******** Thread exists - closing *****")));
 		Close();
 	}
+	delete mSeekTable;
 
 }
 //IAMFilterMiscFlags Interface
@@ -578,7 +580,8 @@
 HRESULT OggDemuxSourceFilter::DataProcessLoop() {
 	//debugLog<<"Starting DataProcessLoop :"<<endl;
 	DWORD locCommand = 0;
-	char* locBuff = new  char[4096];
+	char* locBuff = new  char[4096];			//Deleted before function returns...
+	//TODO::: Make this a member variable ^^^^^
 	bool locKeepGoing = true;
 	unsigned long locBytesRead = 0;
 	bool locIsEOF = true;

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-17 18:58:17 UTC (rev 8048)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggFLAC_1_0_Stream.cpp	2004-10-17 19:13:14 UTC (rev 8049)
@@ -147,7 +147,7 @@
 			//StreamInfoHeader is 38 bytes
 			//
 			//So we discard the first 9 bytes, and keep the next 42 bytes.
-			unsigned char* locPackBuf = new unsigned char[42];
+			unsigned char* locPackBuf = new unsigned char[42];			//Given away to the StampedPacket
 			
 			//locPacket = (StampedOggPacket*)mCodecHeaders->getPacket(0)->clone();
 			memcpy((void*)locPackBuf, (const void*)(mCodecHeaders->getPacket(0)->packetData() + 9), 42);



More information about the commits mailing list