amstream: Keep stream reference when creating sample.
This commit is contained in:
parent
139445eb49
commit
17283f9be5
|
@ -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
|
||||||
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;
|
||||||
|
|
Loading…
Reference in New Issue