From eec4a05e768560df3d71ca5408fe38d042e385e2 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sun, 21 Apr 2019 15:22:40 -0500 Subject: [PATCH] amstream: Reference the returned IMediaStream pointer in IAMMultiMediaStream::AddMediaStream(). Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/amstream/amstream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index f9c9abfecdd..8354df87dee 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -380,7 +380,9 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream This->nbStreams++; if (ppNewStream) - *ppNewStream = (IMediaStream*)pStream; + { + IMediaStream_AddRef(*ppNewStream = (IMediaStream*)pStream); + } } if (SUCCEEDED(hr))