[xiph-commits] r7144 - in trunk/oggdsf/src/lib/core:

illiminable at dactyl.lonelymoon.com illiminable
Thu Jul 15 14:26:06 PDT 2004


directshow/dsfOggDemux ogg/libOOOggSeek
Message-ID: <20040715212606.20F0B9AAAD at dactyl.lonelymoon.com>

Author: illiminable
Date: Thu Jul 15 14:26:06 2004
New Revision: 7144

Modified:
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/OggStream.h
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h
Log:
* Seeking in theora crashes less often, and crashes are now in my code where i can do something about them instead of giving bad data to libtheora and making it break.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-07-15 21:25:34 UTC (rev 7143)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggDemuxSourceFilter.cpp	2004-07-15 21:26:04 UTC (rev 7144)
@@ -503,6 +503,7 @@
//debugLog << "Delivering Begin Flush"<<endl;
for (unsigned long i = 0; i < mStreamMapper->numStreams(); i++) {
mStreamMapper->getOggStream(i)->getPin()->DeliverBeginFlush();
+		mStreamMapper->getOggStream(i)->flush();
}

//Should this be here or endflush or neither ?
@@ -524,6 +525,7 @@

for (unsigned long i = 0; i < mStreamMapper->numStreams(); i++) {
mStreamMapper->getOggStream(i)->getPin()->DeliverEndOfStream();
+		mStreamMapper->getOggStream(i)->flush();
}
mOggBuffer.debugWrite("%%%%%% Reset calling from DeliverEOS");
resetStream();

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp	2004-07-15 21:25:34 UTC (rev 7143)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.cpp	2004-07-15 21:26:04 UTC (rev 7144)
@@ -190,6 +190,10 @@
return new CMediaType(locAMMediaType);
}

+void OggStream::flush() {
+	delete mPartialPacket;
+	mPartialPacket = NULL;
+}
//ANX::: Need to override here to create anx pins
bool OggStream::AddPin() {
createFormatBlock();

Modified: trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h	2004-07-15 21:25:34 UTC (rev 7143)
+++ trunk/oggdsf/src/lib/core/directshow/dsfOggDemux/OggStream.h	2004-07-15 21:26:04 UTC (rev 7144)
@@ -80,6 +80,7 @@
virtual bool OggStream::AddPin();

bool streamReady();
+	void flush();
protected:

virtual StampedOggPacket* processPacket(StampedOggPacket* inPacket);

Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp	2004-07-15 21:25:34 UTC (rev 7143)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.cpp	2004-07-15 21:26:04 UTC (rev 7144)
@@ -38,19 +38,19 @@
{
mSeekMap.clear();
mSeekMap.empty();
-	//stDebug.open("C:\\sktable.log", ios_base::out);
+	stDebug.open("G:\\logs\\sktable.log", ios_base::out);
}

OggSeekTable::~OggSeekTable(void)
{
-	//stDebug.close();
+	stDebug.close();
}

bool OggSeekTable::enabled() {
return mEnabled;
}
bool OggSeekTable::addSeekPoint(__int64 inTime, unsigned long mStartPos) {
-	//stDebug<< "Add Point :  Time = "<<inTime<<"   --   Byte Pos : "<<mStartPos<<endl;
+	stDebug<< "Add Point :  Time = "<<inTime<<"   --   Byte Pos : "<<mStartPos<<endl;
mSeekMap.insert(tSeekMap::value_type(inTime, mStartPos));
return true;


Modified: trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h	2004-07-15 21:25:34 UTC (rev 7143)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOggSeek/OggSeekTable.h	2004-07-15 21:26:04 UTC (rev 7144)
@@ -31,7 +31,7 @@

#pragma once
#include "libOOOggSeek.h"
-//#include <fstream>
+#include <fstream>
#include <map>
using namespace std;

@@ -53,6 +53,6 @@
tSeekMap::value_type mSeekValue;
__int64 mRealStartPos;

-	//fstream stDebug;
+	fstream stDebug;
bool mEnabled;
};



More information about the commits mailing list