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

Christian Costa titan.costa at wanadoo.fr
Mon Apr 13 03:07:41 CDT 2009


---

 dlls/amstream/amstream.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
-------------- next part --------------
diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c
index a709c7b..278e6ee 100644
--- a/dlls/amstream/amstream.c
+++ b/dlls/amstream/amstream.c
@@ -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)
     {


More information about the wine-patches mailing list