[xiph-commits] r7145 -

illiminable at dactyl.lonelymoon.com illiminable
Thu Jul 15 14:36:58 PDT 2004


trunk/oggdsf/src/lib/core/directshow/dsfOggDemux
Message-ID: <20040715213658.E7EF19AAAB at dactyl.lonelymoon.com>

Author: illiminable
Date: Thu Jul 15 14:36:58 2004
New Revision: 7145

Modified:
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h
Log:
* Added a new critical section around flushes that occur at seeks.
* Theora doesn't crash on seek anymore ! Woohoo ! Let us never speak of this code again !

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp	2004-07-15 21:26:04 UTC (rev 7144)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp	2004-07-15 21:36:56 UTC (rev 7145)
@@ -44,11 +44,12 @@
,	mSendExcess(true)
,	mLastEndGranulePos(0)
,	mLastStartGranulePos(0)
+	,	mStreamLock(NULL)
{
//osDebug.open("C:\\ostream.log", ios_base::out);
//Need to do something here !
mSerialNo = inBOSPage->header()->StreamSerialNo();
-
+	mStreamLock = new CCritSec;
//This may need to be moved to derived class
//Yep, Sure did !
//InitCodec(inBOSPage->getPacket(0));
@@ -62,6 +63,7 @@
delete mSourcePin;
delete mCodecHeaders;
delete mPartialPacket;
+	delete mStreamLock;
//Don't try to delete owning filter !!
}

@@ -75,7 +77,7 @@
}
StampedOggPacket* OggStream::processPacket(StampedOggPacket* inPacket) {
//You always get your own copy of a packet back from this function... you must delete it !!!
-
+	CAutoLock locLock(mStreamLock);
if (inPacket->isComplete()) {
if (mPartialPacket == NULL) {
//CASE 1 : New packet is complete and there is no partial packet.
@@ -191,6 +193,7 @@
}

void OggStream::flush() {
+	CAutoLock locLock(mStreamLock);
delete mPartialPacket;
mPartialPacket = NULL;
}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h	2004-07-15 21:26:04 UTC (rev 7144)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h	2004-07-15 21:36:56 UTC (rev 7145)
@@ -103,6 +103,7 @@

OggDemuxSourcePin* mSourcePin;
OggDemuxSourceFilter* mOwningFilter;
+	CCritSec* mStreamLock;

//fstream osDebug;
};



More information about the commits mailing list