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 d117f16b913..34be5dc950d 100644 --- a/dlls/mf/tests/evr.c +++ b/dlls/mf/tests/evr.c @@ -1523,17 +1523,13 @@ 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, "Unexpected hr %#lx.\n", hr); hr = IMFMediaEvent_GetUINT32(event, &MF_EVENT_TOPOLOGY_STATUS, &topo_status); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine ok(topo_status == MF_TOPOSTATUS_ENDED, "Unexpected topology status %d\n", topo_status); IMFMediaEvent_Release(event);
ok(hit_not_set, "Should have un-set the media type\n"); - todo_wine ok(hit_set_again, "Should have set the media type again\n");
hr = IMFMediaSession_Shutdown(session);