From ebd789a0a6507978a6a3aeabc841709b791de8d9 Mon Sep 17 00:00:00 2001 From: Brendan McGrath Date: Thu, 11 Jul 2024 13:29:29 +1000 Subject: [PATCH] mf: Retry PROCESSINPUTNOTIFY if TRANSFORM_TYPE_NOT_SET is returned. Send INVALIDATEMEDIATYPE to allow the transform type to be set before retrying PROCESSINPUTNOTIFY. --- dlls/mf/evr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c index db7053a1405..a13c2d7e89b 100644 --- a/dlls/mf/evr.c +++ b/dlls/mf/evr.c @@ -416,7 +416,10 @@ 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); + { + while (hr == S_OK && (hr = IMFVideoPresenter_ProcessMessage(stream->parent->presenter, MFVP_MESSAGE_PROCESSINPUTNOTIFY, 0)) == MF_E_TRANSFORM_TYPE_NOT_SET) + hr = IMFVideoPresenter_ProcessMessage(stream->parent->presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0); + } if (stream->flags & EVR_STREAM_PREROLLING) {