From: Charlotte Pabst cpabst@codeweavers.com
Before this, stopping and restarting the media session could cause MFT streams to get stuck in the "already pending" state, which would lead to no more samples getting delivered. --- dlls/mf/session.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 483ea6f904f..47760cc44a7 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -1009,13 +1009,19 @@ static HRESULT session_subscribe_sources(struct media_session *session) static void session_flush_nodes(struct media_session *session) { struct topo_node *node; + UINT i;
LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry) { if (node->type == MF_TOPOLOGY_OUTPUT_NODE) IMFStreamSink_Flush(node->object.sink_stream); else if (node->type == MF_TOPOLOGY_TRANSFORM_NODE) + { + for (i = 0; i < node->u.transform.output_count; ++i) + node->u.transform.outputs[i].requests = 0; + IMFTransform_ProcessMessage(node->object.transform, MFT_MESSAGE_COMMAND_FLUSH, 0); + } } }