[PATCH 06/11] mfplat: Implement IMFByteStream::SetCurrentPosition for files.
Derek Lesho
dlesho at codeweavers.com
Tue Feb 4 11:17:17 CST 2020
Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
---
dlls/mfplat/main.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c
index 21d415b79f..90925a4559 100644
--- a/dlls/mfplat/main.c
+++ b/dlls/mfplat/main.c
@@ -3347,6 +3347,21 @@ static HRESULT WINAPI bytestream_file_GetLength(IMFByteStream *iface, QWORD *len
return S_OK;
}
+static HRESULT WINAPI bytestream_file_SetCurrentPosition(IMFByteStream *iface, QWORD position)
+{
+ struct bytestream *stream = impl_from_IMFByteStream(iface);
+
+ TRACE("%p, %s\n", iface, wine_dbgstr_longlong(position));
+
+ EnterCriticalSection(&stream->cs);
+
+ stream->position = position;
+
+ LeaveCriticalSection(&stream->cs);
+
+ return S_OK;
+}
+
static HRESULT WINAPI bytestream_file_IsEndOfStream(IMFByteStream *iface, BOOL *ret)
{
struct bytestream *stream = impl_from_IMFByteStream(iface);
@@ -3478,7 +3493,7 @@ static const IMFByteStreamVtbl bytestream_file_vtbl =
bytestream_file_GetLength,
mfbytestream_SetLength,
mfbytestream_GetCurrentPosition,
- mfbytestream_SetCurrentPosition,
+ bytestream_file_SetCurrentPosition,
bytestream_file_IsEndOfStream,
bytestream_file_Read,
bytestream_BeginRead,
--
2.25.0
More information about the wine-devel
mailing list