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

Alexandre Julliard julliard at winehq.org
Tue Apr 14 16:00:00 CDT 2009


Module: wine
Branch: master
Commit: 73eff344f089f4e711ad9aa32e467f2659d1ce11
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=73eff344f089f4e711ad9aa32e467f2659d1ce11

Author: Christian Costa <titan.costa at wanadoo.fr>
Date:   Mon Apr 13 10:07:41 2009 +0200

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

---

 dlls/amstream/amstream.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c
index 2e0c581..81584d6 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-cvs mailing list