Commit 9070f0d5 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

mf/session: Avoid dropping samples delivered from transform in session_request_sample_from_node().

session_request_sample() calls session_request_sample_from_node() and increments sink.requests only if that succeeds. But session_request_sample_from_node() calls session_deliver_sample_to_node() synchronously for MF_TOPOLOGY_TRANSFORM_NODE if there are output samples available. Then, if sink.requests is zero before this session_request_sample() call that sample is silently dropped.
parent 7ac3b0fd
......@@ -3388,8 +3388,9 @@ static void session_request_sample(struct media_session *session, IMFStreamSink
return;
}
if (SUCCEEDED(session_request_sample_from_node(session, upstream_node, upstream_output)))
sink_node->u.sink.requests++;
sink_node->u.sink.requests++;
if (FAILED(session_request_sample_from_node(session, upstream_node, upstream_output)))
sink_node->u.sink.requests--;
IMFTopologyNode_Release(upstream_node);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment