Maarten Lankhorst : quartz: Add more seek entries and fix a time continuity bug.
Alexandre Julliard
julliard at winehq.org
Mon Apr 21 07:46:37 CDT 2008
Module: wine
Branch: master
Commit: c1a4acde0153626095685ff1c97287cf25004087
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1a4acde0153626095685ff1c97287cf25004087
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Fri Apr 18 22:21:59 2008 -0700
quartz: Add more seek entries and fix a time continuity bug.
---
dlls/quartz/mpegsplit.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c
index 9af8973..008dcca 100644
--- a/dlls/quartz/mpegsplit.c
+++ b/dlls/quartz/mpegsplit.c
@@ -53,7 +53,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
#define MPEG_AUDIO_HEADER 1
#define MPEG_NO_HEADER 0
-#define SEEK_INTERVAL (ULONGLONG)(30 * 10000000) /* Add an entry every 30 seconds */
+#define SEEK_INTERVAL (ULONGLONG)(10 * 10000000) /* Add an entry every 10 seconds */
struct seek_entry {
ULONGLONG bytepos;
@@ -216,6 +216,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, BYTE** fbuf, DWORD *flen, IMed
if (This->remaining_bytes)
{
DWORD towrite = min(This->remaining_bytes, *flen);
+ LONGLONG foo;
hr = copy_data(pCurrentSample, fbuf, flen, towrite);
if (FAILED(hr))
@@ -228,6 +229,11 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, BYTE** fbuf, DWORD *flen, IMed
if (This->remaining_bytes)
return hr;
+ /* Restore the time in the time variable. This->position now points
+ * to the NEW timestamp which is slightly off
+ */
+ IMediaSample_GetTime(pCurrentSample, &time, &foo);
+
/* Optimize: Try appending more samples to the stream */
goto out_append;
}
More information about the wine-cvs
mailing list