Nikolay Sivov : mf/evr: Implement Flush() for streams.
Alexandre Julliard
julliard at winehq.org
Fri May 7 15:42:03 CDT 2021
Module: wine
Branch: master
Commit: 7d51f493b84f350d7d1c5d5cf2c5725e4296baab
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7d51f493b84f350d7d1c5d5cf2c5725e4296baab
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri May 7 12:27:20 2021 +0300
mf/evr: Implement Flush() for streams.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mf/evr.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index 64489ac4c58..6a4332965b6 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -462,9 +462,19 @@ static HRESULT WINAPI video_stream_sink_PlaceMarker(IMFStreamSink *iface, MFSTRE
static HRESULT WINAPI video_stream_sink_Flush(IMFStreamSink *iface)
{
- FIXME("%p.\n", iface);
+ struct video_stream *stream = impl_from_IMFStreamSink(iface);
+ HRESULT hr;
- return E_NOTIMPL;
+ TRACE("%p.\n", iface);
+
+ EnterCriticalSection(&stream->cs);
+ if (!stream->parent)
+ hr = MF_E_STREAMSINK_REMOVED;
+ else if (SUCCEEDED(hr = IMFTransform_ProcessMessage(stream->parent->mixer, MFT_MESSAGE_COMMAND_FLUSH, 0)))
+ hr = IMFVideoPresenter_ProcessMessage(stream->parent->presenter, MFVP_MESSAGE_FLUSH, 0);
+ LeaveCriticalSection(&stream->cs);
+
+ return hr;
}
static const IMFStreamSinkVtbl video_stream_sink_vtbl =
More information about the wine-cvs
mailing list