Commit dd6b2f9a authored by Santino Mazza's avatar Santino Mazza Committed by Alexandre Julliard

mf/session: Handle error when a source fails to start.

parent 74b64eab
......@@ -920,7 +920,11 @@ static void session_start(struct media_session *session, const GUID *time_format
LIST_FOR_EACH_ENTRY(source, &session->presentation.sources, struct media_source, entry)
{
if (FAILED(hr = IMFMediaSource_Start(source->source, source->pd, &GUID_NULL, start_position)))
{
WARN("Failed to start media source %p, hr %#lx.\n", source->source, hr);
session_command_complete_with_event(session, MESessionStarted, hr, NULL);
return;
}
}
session->state = SESSION_STATE_STARTING_SOURCES;
......
......@@ -2514,7 +2514,7 @@ static void test_media_session_events(void)
hr = IMFMediaSession_Start(session, &GUID_NULL, &propvar);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = wait_media_event_until_blocking(session, callback, MESessionStarted, 1000, &propvar);
todo_wine ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
ok(hr == E_NOTIMPL, "Unexpected hr %#lx.\n", hr);
ok(propvar.vt == VT_EMPTY, "got vt %u\n", propvar.vt);
ok(propvar.punkVal != (IUnknown *)topology, "got punkVal %p\n", propvar.punkVal);
PropVariantClear(&propvar);
......
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