Module: wine Branch: master Commit: 97d7d321919e95c06c356fd3c32ae24d6fd0a362 URL: https://gitlab.winehq.org/wine/wine/-/commit/97d7d321919e95c06c356fd3c32ae24...
Author: Zebediah Figura zfigura@codeweavers.com Date: Sat Jul 22 21:06:53 2023 -0500
amstream: Release the previous ddraw in ddraw_IAMMediaStream_Initialize().
---
dlls/amstream/ddrawstream.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/amstream/ddrawstream.c b/dlls/amstream/ddrawstream.c index 77795be47fa..b31466803f4 100644 --- a/dlls/amstream/ddrawstream.c +++ b/dlls/amstream/ddrawstream.c @@ -324,6 +324,10 @@ static HRESULT WINAPI ddraw_IAMMediaStream_Initialize(IAMMediaStream *iface, IUn stream->purpose_id = *purpose_id; stream->stream_type = stream_type;
+ if (stream->ddraw) + IDirectDraw_Release(stream->ddraw); + stream->ddraw = NULL; + if (source_object && FAILED(hr = IUnknown_QueryInterface(source_object, &IID_IDirectDraw, (void **)&stream->ddraw))) FIXME("Stream object doesn't implement IDirectDraw interface, hr %#lx.\n", hr);