Commit 17283f9b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

amstream: Keep stream reference when creating sample.

parent 139445eb
...@@ -906,6 +906,7 @@ static ULONG WINAPI IDirectDrawStreamSampleImpl_Release(IDirectDrawStreamSample ...@@ -906,6 +906,7 @@ static ULONG WINAPI IDirectDrawStreamSampleImpl_Release(IDirectDrawStreamSample
{ {
if (This->surface) if (This->surface)
IDirectDrawSurface_Release(This->surface); IDirectDrawSurface_Release(This->surface);
IMediaStream_Release(This->parent);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
} }
...@@ -1011,6 +1012,8 @@ static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectD ...@@ -1011,6 +1012,8 @@ static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectD
object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl; object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl;
object->ref = 1; object->ref = 1;
object->parent = (IMediaStream*)parent; object->parent = (IMediaStream*)parent;
IMediaStream_AddRef(object->parent);
if (surface) if (surface)
{ {
object->surface = surface; object->surface = surface;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment