Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34746 Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/amstream/multimedia.c | 13 +++++++++---- dlls/amstream/tests/amstream.c | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/dlls/amstream/multimedia.c b/dlls/amstream/multimedia.c index b34634d89d2..6bac95a243b 100644 --- a/dlls/amstream/multimedia.c +++ b/dlls/amstream/multimedia.c @@ -207,13 +207,18 @@ static HRESULT WINAPI multimedia_stream_Seek(IAMMultiMediaStream *iface, STREAM_ return IMediaSeeking_SetPositions(This->media_seeking, &seek_time, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); }
-static HRESULT WINAPI multimedia_stream_GetEndOfStream(IAMMultiMediaStream *iface, HANDLE *phEOS) +static HRESULT WINAPI multimedia_stream_GetEndOfStream(IAMMultiMediaStream *iface, HANDLE *eos) { - struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface); + struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface);
- FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS); + TRACE("mmstream %p, eos %p.\n", mmstream, eos);
- return E_NOTIMPL; + if (!eos) + return E_POINTER; + + *eos = (HANDLE)mmstream->event; + + return S_OK; }
static HRESULT create_graph(struct multimedia_stream *mmstream, IGraphBuilder *graph) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 56dc8003719..5226a072364 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -2991,11 +2991,11 @@ static void test_get_end_of_stream_event_handle(void) ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IAMMultiMediaStream_GetEndOfStreamEventHandle(mmstream, NULL); - todo_wine ok(hr == E_POINTER, "Got hr %#x.\n", hr); + ok(hr == E_POINTER, "Got hr %#x.\n", hr);
event = INVALID_HANDLE_VALUE; hr = IAMMultiMediaStream_GetEndOfStreamEventHandle(mmstream, &event); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IGraphBuilder_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &rgb32_mt); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -3013,12 +3013,12 @@ static void test_get_end_of_stream_event_handle(void) hr = IPin_EndOfStream(pin); ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n"); + ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP); ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n"); + ok(WaitForSingleObject(event, 0) == 0, "Event should be signaled.\n");
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); ok(hr == S_OK, "Got hr %#x.\n", hr);