Commit 4634fd4c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf/session: Handle MF_TOPONODE_DISABLE_PREROLL on sink nodes.

parent d614d048
......@@ -1232,6 +1232,7 @@ static DWORD session_get_object_rate_caps(IUnknown *object)
static HRESULT session_add_media_sink(struct media_session *session, IMFTopologyNode *node, IMFMediaSink *sink)
{
struct media_sink *media_sink;
unsigned int disable_preroll = 0;
DWORD flags;
LIST_FOR_EACH_ENTRY(media_sink, &session->presentation.sinks, struct media_sink, entry)
......@@ -1248,7 +1249,8 @@ static HRESULT session_add_media_sink(struct media_session *session, IMFTopology
IMFMediaSink_QueryInterface(media_sink->sink, &IID_IMFMediaEventGenerator, (void **)&media_sink->event_generator);
if (SUCCEEDED(IMFMediaSink_GetCharacteristics(sink, &flags)) && flags & MEDIASINK_CAN_PREROLL)
IMFTopologyNode_GetUINT32(node, &MF_TOPONODE_DISABLE_PREROLL, &disable_preroll);
if (SUCCEEDED(IMFMediaSink_GetCharacteristics(sink, &flags)) && flags & MEDIASINK_CAN_PREROLL && !disable_preroll)
{
if (SUCCEEDED(IMFMediaSink_QueryInterface(media_sink->sink, &IID_IMFMediaSinkPreroll, (void **)&media_sink->preroll)))
session->presentation.flags |= SESSION_FLAG_NEEDS_PREROLL;
......
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