amstream: Initialize the stream in OpenFile if not done before.

This commit is contained in:
Christian Costa 2009-04-13 10:07:41 +02:00 committed by Alexandre Julliard
parent 81ebb0900d
commit 73eff344f0

View file

@ -349,6 +349,14 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* ifac
goto end;
}
/* If Initialize was not called before, we do it here */
if (!This->pFilterGraph)
{
ret = IAMMultiMediaStream_Initialize(iface, STREAMTYPE_READ, 0, NULL);
if (FAILED(ret))
goto end;
}
ret = IFilterGraph_QueryInterface(This->pFilterGraph, &IID_IGraphBuilder, (void**)&This->GraphBuilder);
if(ret != S_OK)
{