On 5/22/20 10:40 AM, Anton Baskanov wrote:
@@ -377,18 +379,26 @@ static HRESULT WINAPI multimedia_stream_AddMediaStream(IAMMultiMediaStream *ifac }
if (IsEqualGUID(PurposeId, &MSPID_PrimaryVideo))
hr = ddraw_stream_create_and_initialize((IMultiMediaStream*)iface, PurposeId, stream_object, This->type, &pStream);
else if (IsEqualGUID(PurposeId, &MSPID_PrimaryAudio))clsid = &CLSID_AMDirectDrawStream;
hr = audio_stream_create_and_initialize((IMultiMediaStream*)iface, PurposeId, stream_object, This->type, &pStream);
else return MS_E_PURPOSEID;clsid = &CLSID_AMAudioStream;
- if (SUCCEEDED(hr))
- hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IAMMediaStream, (void **)&pStream);
- if (FAILED(hr))
return hr;
- hr = IAMMediaStream_Initialize(pStream, stream_object, dwFlags, PurposeId, This->type);
- if (FAILED(hr)) {
add_stream(This, pStream, ret_stream); IAMMediaStream_Release(pStream);
return hr;
}
add_stream(This, pStream, ret_stream);
IAMMediaStream_Release(pStream);
return hr;
}
I guess I'm not very opposed to this, but it'd be nice to know at least if there's an application that depends on this structure.