[xiph-commits] r15514 - trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource

cristianadam at svn.xiph.org cristianadam at svn.xiph.org
Sun Nov 9 04:50:37 PST 2008


Author: cristianadam
Date: 2008-11-09 04:50:37 -0800 (Sun, 09 Nov 2008)
New Revision: 15514

Modified:
   trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.cpp
   trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.h
Log:
Removed deadlocking code, the critical section was not really needed.

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.cpp	2008-11-06 00:10:28 UTC (rev 15513)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.cpp	2008-11-09 12:50:37 UTC (rev 15514)
@@ -70,7 +70,6 @@
 	,	mWasEOF(false)
 {
 	m_pLock = new CCritSec;
-	mCodecLock = new CCritSec;
 	mFLACSourcePin = new NativeFLACSourcePin(this, m_pLock);
 }
 
@@ -78,7 +77,6 @@
 {
 	delete mFLACSourcePin;
 	mFLACSourcePin = NULL;
-	delete mCodecLock;
 }
 
 //BaseFilter Interface
@@ -234,8 +232,8 @@
 			return S_OK;
 		}
 		{
-			CAutoLock locLock(mCodecLock);
 			if (mJustSeeked) {
+				mUpto = 0;
 				mJustSeeked = false;
 				bool res2 = false;
 				res2 = seek_absolute(mSeekRequest);
@@ -488,13 +486,8 @@
 	mFLACSourcePin->DeliverBeginFlush();
 	mFLACSourcePin->DeliverEndFlush();
 
-	bool locRes = false;
-	{
-		CAutoLock locLock(mCodecLock);
-		mUpto = 0;
-		mJustSeeked = true;
-		mSeekRequest = locSampleToSeek;
-	}
+	mJustSeeked = true;
+	mSeekRequest = locSampleToSeek;
 	
 	return S_OK;
 }

Modified: trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.h	2008-11-06 00:10:28 UTC (rev 15513)
+++ trunk/oggdsf/src/lib/codecs/flac/filters/dsfNativeFLACSource/NativeFLACSourceFilter.h	2008-11-09 12:50:37 UTC (rev 15514)
@@ -151,8 +151,4 @@
 	unsigned long mBitsPerSample;
     unsigned long mSignificantBitsPerSample;
 	__int64 mTotalNumSamples;
-
-	//Critical Section to protect codec.
-	CCritSec* mCodecLock;
-
 };



More information about the commits mailing list