[PATCH] winegstreamer: Clear the "reader" and "allocator" fields if connection fails.
This fixes a regression introduced by dafe81dfcb2b8896024e9d071e4bf4553e4a4018. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- dlls/winegstreamer/gstdemux.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 3945d9da8f..869a15b619 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1393,6 +1393,8 @@ static HRESULT gstdemux_sink_connect(struct strmbase_sink *iface, IPin *peer, co if (FAILED(hr = IMemAllocator_Commit(filter->alloc))) { WARN("Failed to commit allocator, hr %#x.\n", hr); + IMemAllocator_Release(filter->alloc); + filter->alloc = NULL; goto err; } @@ -1400,6 +1402,7 @@ static HRESULT gstdemux_sink_connect(struct strmbase_sink *iface, IPin *peer, co err: GST_RemoveOutputPins(filter); IAsyncReader_Release(filter->reader); + filter->reader = NULL; return hr; } -- 2.24.1
participants (1)
-
Zebediah Figura