amstream: Simplify IAMMultiMediaStream::GetFilterGraph().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-03-04 22:33:31 -06:00 committed by Alexandre Julliard
parent 0eea1b09d3
commit 753d007cbb
1 changed files with 7 additions and 8 deletions

View File

@ -250,20 +250,19 @@ static HRESULT WINAPI multimedia_stream_Initialize(IAMMultiMediaStream *iface,
return hr;
}
static HRESULT WINAPI multimedia_stream_GetFilterGraph(IAMMultiMediaStream *iface,
IGraphBuilder **ppGraphBuilder)
static HRESULT WINAPI multimedia_stream_GetFilterGraph(IAMMultiMediaStream *iface, IGraphBuilder **graph)
{
struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)->(%p)\n", This, iface, ppGraphBuilder);
TRACE("mmstream %p, graph %p.\n", mmstream, graph);
if (!ppGraphBuilder)
if (!graph)
return E_POINTER;
if (This->pFilterGraph)
return IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IGraphBuilder, (void**)ppGraphBuilder);
if (mmstream->pFilterGraph)
IGraphBuilder_AddRef(*graph = mmstream->pFilterGraph);
else
*ppGraphBuilder = NULL;
*graph = NULL;
return S_OK;
}