From: Brendan McGrath bmcgrath@codeweavers.com
Send INVALIDATEMEDIATYPE to allow the transform type to be set before retrying PROCESSINPUTNOTIFY. --- dlls/mf/evr.c | 8 +++++++- dlls/mf/tests/evr.c | 4 ---- 2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c index db7053a1405..2f7e7e8b997 100644 --- a/dlls/mf/evr.c +++ b/dlls/mf/evr.c @@ -416,7 +416,13 @@ static HRESULT WINAPI video_stream_sink_ProcessSample(IMFStreamSink *iface, IMFS }
if (SUCCEEDED(IMFTransform_ProcessInput(stream->parent->mixer, stream->id, sample, 0))) - IMFVideoPresenter_ProcessMessage(stream->parent->presenter, MFVP_MESSAGE_PROCESSINPUTNOTIFY, 0); + { + if (IMFVideoPresenter_ProcessMessage(stream->parent->presenter, MFVP_MESSAGE_PROCESSINPUTNOTIFY, 0) == MF_E_TRANSFORM_TYPE_NOT_SET) + { + IMFVideoPresenter_ProcessMessage(stream->parent->presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0); + IMFVideoPresenter_ProcessMessage(stream->parent->presenter, MFVP_MESSAGE_PROCESSINPUTNOTIFY, 0); + } + }
if (stream->flags & EVR_STREAM_PREROLLING) { diff --git a/dlls/mf/tests/evr.c b/dlls/mf/tests/evr.c index fa4e6d3beb4..e3a4a579e72 100644 --- a/dlls/mf/tests/evr.c +++ b/dlls/mf/tests/evr.c @@ -1523,18 +1523,14 @@ static void test_custom_processor(void)
/* wait for and handle MF_TOPOSTATUS_ENDED */ hr = wait_media_event_until_blocking(session, event_callback, MESessionTopologyStatus, 1000, NULL, &event); - todo_wine ok(hr == S_OK || broken(!hit_not_set), "Unexpected hr %#lx.\n", hr); /* Win 8 doesn't send MFVP_MESSAGE_PROCESSINPUTNOTIFY */ hr = IMFMediaEvent_GetUINT32(event, &MF_EVENT_TOPOLOGY_STATUS, &topo_status); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine /* Win 8 doesn't send MFVP_MESSAGE_PROCESSINPUTNOTIFY */ ok(topo_status == MF_TOPOSTATUS_ENDED || broken(!hit_not_set), "Unexpected topology status %d\n", topo_status); IMFMediaEvent_Release(event);
ok(hit_not_set || broken(!hit_not_set), "Should have un-set the media type\n"); /* Win 8 doesn't send MFVP_MESSAGE_PROCESSINPUTNOTIFY */ - todo_wine ok(hit_set_again || broken(!hit_not_set), "Should have set the media type again\n"); /* Win 8 doesn't send MFVP_MESSAGE_PROCESSINPUTNOTIFY */
hr = IMFMediaSession_Shutdown(session);