From: Conor McCarthy cmccarthy@codeweavers.com
Placing the marker is not the result of a request but of receiving MEEndOfStream. Decrementing the request count can halt later sample delivery. --- dlls/mf/session.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 87af5b95eab..664f25a4c32 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -3888,21 +3888,21 @@ static void session_deliver_sample_to_node(struct media_session *session, struct switch (topo_node->type) { case MF_TOPOLOGY_OUTPUT_NODE: - if (topo_node->u.sink.requests) + if (!sample) { - if (sample) - { - if (FAILED(hr = IMFStreamSink_ProcessSample(topo_node->object.sink_stream, sample))) - { - WARN("Stream sink failed to process sample, hr %#lx.\n", hr); - IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MEError, &GUID_NULL, hr, NULL); - } - } - else if (FAILED(hr = IMFStreamSink_PlaceMarker(topo_node->object.sink_stream, MFSTREAMSINK_MARKER_ENDOFSEGMENT, + if (FAILED(hr = IMFStreamSink_PlaceMarker(topo_node->object.sink_stream, MFSTREAMSINK_MARKER_ENDOFSEGMENT, NULL, NULL))) { WARN("Failed to place sink marker, hr %#lx.\n", hr); } + } + else if (topo_node->u.sink.requests) + { + if (FAILED(hr = IMFStreamSink_ProcessSample(topo_node->object.sink_stream, sample))) + { + WARN("Stream sink failed to process sample, hr %#lx.\n", hr); + IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MEError, &GUID_NULL, hr, NULL); + } topo_node->u.sink.requests--; } break;