[PATCH 5/5] evr/mixer: Request more sample on successful ProcessOutput().

Nikolay Sivov nsivov at codeweavers.com
Fri Oct 23 06:33:30 CDT 2020


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/evr/mixer.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c
index c0d46ce5331..59d75c0476b 100644
--- a/dlls/evr/mixer.c
+++ b/dlls/evr/mixer.c
@@ -1038,6 +1038,7 @@ static HRESULT WINAPI video_mixer_transform_ProcessMessage(IMFTransform *iface,
                 {
                     IMFSample_Release(mixer->inputs[i].sample);
                     mixer->inputs[i].sample = NULL;
+                    mixer->inputs[i].sample_requested = 0;
                 }
             }
 
@@ -1150,6 +1151,7 @@ static HRESULT WINAPI video_mixer_transform_ProcessOutput(IMFTransform *iface, D
     struct video_mixer *mixer = impl_from_IMFTransform(iface);
     IDirect3DSurface9 *surface;
     IDirect3DDevice9 *device;
+    unsigned int i;
     HRESULT hr;
 
     TRACE("%p, %#x, %u, %p, %p.\n", iface, flags, count, buffers, status);
@@ -1168,8 +1170,26 @@ static HRESULT WINAPI video_mixer_transform_ProcessOutput(IMFTransform *iface, D
     {
         if (mixer->is_streaming)
         {
-            FIXME("Streaming state is not handled.\n");
-            hr = E_NOTIMPL;
+            for (i = 0; i < mixer->input_count; ++i)
+            {
+                if (!mixer->inputs[i].sample)
+                {
+                    hr = MF_E_TRANSFORM_NEED_MORE_INPUT;
+                    break;
+                }
+            }
+
+            /* FIXME: for now discard input */
+
+            if (SUCCEEDED(hr))
+            {
+                for (i = 0; i < mixer->input_count; ++i)
+                {
+                    IMFSample_Release(mixer->inputs[i].sample);
+                    mixer->inputs[i].sample = NULL;
+                    video_mixer_request_sample(mixer, i);
+                }
+            }
         }
         else
         {
-- 
2.28.0




More information about the wine-devel mailing list