[xiph-commits] r10844 - in trunk/oggdsf: build/oggcodecs
src/lib/core/directshow/dsfOggDemux2
illiminable at svn.xiph.org
illiminable at svn.xiph.org
Tue Feb 21 11:41:33 PST 2006
Author: illiminable
Date: 2006-02-21 11:41:24 -0800 (Tue, 21 Feb 2006)
New Revision: 10844
Modified:
trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp
Log:
* Fix race condition that could occur when in one thread a new page is processed and sent for dispatch, while in another thread a seek operation begins. In the dispatch thread, previously all non-OK messages caused an EOS message to be sent, but trying to send an EOS while a seek is in progress causes a deadlock. Now an EOS is only sent on errors not just rejected data. The deadlock can probably still occur if the dispatched page has an error while a seek is in progress, can try and fix that rare case later.
Modified: trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj
===================================================================
--- trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj 2006-02-21 11:19:58 UTC (rev 10843)
+++ trunk/oggdsf/build/oggcodecs/oggcodecs.vdproj 2006-02-21 19:41:24 UTC (rev 10844)
@@ -178,6 +178,12 @@
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
+ "OwnerKey" = "8:_CC5E9D059E6044FA954061CAC6A8A1C0"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
"OwnerKey" = "8:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
"MsmSig" = "8:_UNDEFINED"
}
@@ -334,6 +340,12 @@
"Entry"
{
"MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
+ "OwnerKey" = "8:_0CADC4E67409461481DE8E39EA059436"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_46A378A9B03E4612A645053EDB884C20"
"OwnerKey" = "8:_0A1E63E5852E4F759F1A27E8F097727B"
"MsmSig" = "8:_UNDEFINED"
}
@@ -363,6 +375,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_5752F7DAA54F2A09A6DC1D6BEB922BDD"
+ "OwnerKey" = "8:_CC5E9D059E6044FA954061CAC6A8A1C0"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_578B89273D59478F861AA5BC3600D074"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -460,6 +478,12 @@
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+ "OwnerKey" = "8:_CC5E9D059E6044FA954061CAC6A8A1C0"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
"OwnerKey" = "8:_C6ED1B8B0AAC495E9D25CDE58FC9E711"
"MsmSig" = "8:_UNDEFINED"
}
@@ -628,6 +652,12 @@
"Entry"
{
"MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
+ "OwnerKey" = "8:_0CADC4E67409461481DE8E39EA059436"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_655D5383153A6AB10D15352A7EABCC7A"
"OwnerKey" = "8:_0A1E63E5852E4F759F1A27E8F097727B"
"MsmSig" = "8:_UNDEFINED"
}
@@ -989,6 +1019,26 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
+ "{A582A373-4685-4296-BEFE-614B80A702C3}:_5752F7DAA54F2A09A6DC1D6BEB922BDD"
+ {
+ "SourcePath" = "8:WSOCK32.dll"
+ "TargetName" = "8:WSOCK32.dll"
+ "Tag" = "8:"
+ "Folder" = "8:_371AD289B6DB4693BDF7568485051F1E"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:TRUE"
+ "IsDependency" = "11:TRUE"
+ "IsolateTo" = "8:"
+ }
"{A582A373-4685-4296-BEFE-614B80A702C3}:_655D5383153A6AB10D15352A7EABCC7A"
{
"SourcePath" = "8:MSVCR71D.dll"
@@ -1185,7 +1235,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oggcodecs"
"ProductCode" = "8:{D65F0073-A820-4085-B997-A061171595A7}"
- "PackageCode" = "8:{05A78791-212E-4917-AC92-03F63D652857}"
+ "PackageCode" = "8:{497A4E78-9A3F-4339-817B-5A453D86FF8D}"
"UpgradeCode" = "8:{1A644FEB-7597-4FAB-AADE-C2C7C64C5984}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp 2006-02-21 11:19:58 UTC (rev 10843)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux2/OggDemuxPacketSourceFilter.cpp 2006-02-21 19:41:24 UTC (rev 10844)
@@ -216,7 +216,7 @@
void OggDemuxPacketSourceFilter::DeliverEOS()
{
//mStreamMapper->toStartOfData();
-
+ //CAutoLock locLock(m_pLock);
for (unsigned long i = 0; i < mStreamMapper->numPins(); i++) {
//mStreamMapper->getOggStream(i)->flush();
mStreamMapper->getPinByIndex(i)->DeliverEndOfStream();
@@ -494,6 +494,9 @@
bool locKeepGoing = true;
unsigned long locBytesRead = 0;
bool locIsEOF = true;
+
+ OggDataBuffer::eFeedResult locFeedResult;
+
{
CAutoLock locSourceLock(mSourceFileLock);
locIsEOF = mDataSource->isEOF();
@@ -520,7 +523,8 @@
if (mJustReset) { //To avoid blocking problems... restart the loop if it was just reset while waiting for lock.
continue;
}
- locKeepGoing = ((mOggBuffer.feed((const unsigned char*)locBuff, locBytesRead)) == (OggDataBuffer::FEED_OK));;
+ locFeedResult = mOggBuffer.feed((const unsigned char*)locBuff, locBytesRead);
+ locKeepGoing = ((locFeedResult == (OggDataBuffer::FEED_OK)) || (locFeedResult == OggDataBuffer::PROCESS_DISPATCH_FALSE));;
}
if (!locKeepGoing) {
//debugLog << "DataProcessLoop : Feed in data buffer said stop"<<endl;
@@ -641,8 +645,10 @@
if ((mSeekTable != NULL) && (mSeekTable->enabled())) {
+
CAutoLock locSourceLock(mSourceFileLock);
DeliverBeginFlush();
+
//Find the byte position for this time.
if (*pCurrent > mSeekTable->fileDuration()) {
More information about the commits
mailing list