On Saturday, 23 May 2020 04:11:17 +07 you wrote:
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); + clsid = &CLSID_AMDirectDrawStream;
else if (IsEqualGUID(PurposeId, &MSPID_PrimaryAudio))
hr =
audio_stream_create_and_initialize((IMultiMediaStream*)iface, PurposeId, stream_object, This->type, &pStream); + clsid = &CLSID_AMAudioStream;
else return MS_E_PURPOSEID;
- 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.
I don't know any such application, I just wanted to use this in my seeking tests, so that I can add more than 2 streams.