Module: wine Branch: master Commit: 25469b5a323417de522d41ec8b765e7d8879692a URL: https://gitlab.winehq.org/wine/wine/-/commit/25469b5a323417de522d41ec8b765e7...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed May 10 00:49:35 2023 +0200
winegstreamer: Keep a reference on the media source start descriptor.
---
dlls/winegstreamer/media_source.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c index d404662e5bb..558d7dd51f5 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -174,7 +174,10 @@ static ULONG WINAPI source_async_command_Release(IUnknown *iface) if (!refcount) { if (command->op == SOURCE_ASYNC_START) + { + IMFPresentationDescriptor_Release(command->u.start.descriptor); PropVariantClear(&command->u.start.position); + } else if (command->op == SOURCE_ASYNC_REQUEST_SAMPLE) { if (command->u.request_sample.token) @@ -1376,6 +1379,7 @@ static HRESULT WINAPI media_source_Start(IMFMediaSource *iface, IMFPresentationD { struct source_async_command *command = impl_from_async_command_IUnknown(op); command->u.start.descriptor = descriptor; + IMFPresentationDescriptor_AddRef(descriptor); command->u.start.format = *time_format; PropVariantCopy(&command->u.start.position, position);