From 819643ada87a4b033bfd93f84894d5a15b35eb70 Mon Sep 17 00:00:00 2001 From: Erich Hoover Date: Sat, 14 May 2011 11:14:45 -0600 Subject: [PATCH] quartz: Return IMediaSeeking interface for Parser PullPin. --- dlls/quartz/parser.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index b5a305c095..784c528258 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -702,6 +702,31 @@ static const IPinVtbl Parser_OutputPin_Vtbl = BasePinImpl_NewSegment }; +static HRESULT WINAPI Parser_PullPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) +{ + PullPin *This = (PullPin *)iface; + + TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv); + + *ppv = NULL; + + /* + * It is important to capture the request for the IMediaSeeking interface before it is passed + * on to PullPin_QueryInterface, this is necessary since the Parser filter does not support + * querying IMediaSeeking + */ + if (IsEqualIID(riid, &IID_IMediaSeeking)) + *ppv = &((ParserImpl*)This->pin.pinInfo.pFilter)->sourceSeeking; + + if (*ppv) + { + IUnknown_AddRef((IUnknown *)(*ppv)); + return S_OK; + } + + return PullPin_QueryInterface(iface, riid, ppv); +} + static HRESULT WINAPI Parser_PullPin_Disconnect(IPin * iface) { HRESULT hr; @@ -770,7 +795,7 @@ static HRESULT WINAPI Parser_PullPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes static const IPinVtbl Parser_InputPin_Vtbl = { - PullPin_QueryInterface, + Parser_PullPin_QueryInterface, BasePinImpl_AddRef, PullPin_Release, BaseInputPinImpl_Connect, -- 2.32.0.93.g670b81a890