From: Conor McCarthy cmccarthy@codeweavers.com
Calling session_deliver_sample_to_node() on the downstream node does not fulfill requests from the current node. It sets the downstream node to draining, and delivers all its pending requests according to its own request count. --- dlls/mf/session.c | 3 +-- dlls/mf/tests/mf.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 664f25a4c32..21ea1cd1043 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -3850,10 +3850,9 @@ static void transform_node_deliver_samples(struct media_session *session, struct IMFMediaEvent_Release(event); }
- while (stream->requests && drained) + if (drained) { session_deliver_sample_to_node(session, down_node, input, NULL); - stream->requests--; } }
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 0876de45e59..0ad5feefb8c 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -6718,7 +6718,6 @@ static void test_media_session_Start(void) hr = IMFPresentationClock_GetTime(presentation_clock, &time); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(llabs(time) <= allowed_error, "Unexpected time %I64d.\n", time); - todo_wine check_sample_delivery(grabber_callback->ready_event);
/* Seek to 1s while in paused state */ @@ -6745,7 +6744,6 @@ static void test_media_session_Start(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(time > old_time, "Unexpected time %I64d.\n", time);
- todo_wine check_sample_delivery(grabber_callback->ready_event);
/* Pause followed by immediate restart at current time. @@ -6766,7 +6764,7 @@ static void test_media_session_Start(void) ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); hr = wait_media_event(session, callback, MESessionStarted, 1000, &propvar); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - todo_wine + flaky_wine check_sample_delivery(grabber_callback->ready_event);
hr = IMFMediaSession_Stop(session);