Module: wine Branch: master Commit: 797672182be30fbd6d54732267cd2869f4af42c1 URL: https://source.winehq.org/git/wine.git/?a=commit;h=797672182be30fbd6d5473226...
Author: Zebediah Figura z.figura12@gmail.com Date: Sat May 11 14:46:19 2019 -0500
winegstreamer: Make GSTOutPin_BreakConnect() a local helper.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winegstreamer/gstdemux.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 3c32107..1a369a1 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1829,7 +1829,7 @@ static HRESULT WINAPI GSTOutPin_DecideAllocator(BaseOutputPin *iface, IMemInputP return hr; }
-static HRESULT WINAPI GSTOutPin_BreakConnect(BaseOutputPin *This) +static HRESULT break_source_connection(BaseOutputPin *This) { HRESULT hr;
@@ -1840,7 +1840,9 @@ static HRESULT WINAPI GSTOutPin_BreakConnect(BaseOutputPin *This) hr = VFW_E_NOT_CONNECTED; else { - hr = IPin_Disconnect(This->pin.pConnectedTo); + hr = IMemAllocator_Decommit(This->pAllocator); + if (SUCCEEDED(hr)) + hr = IPin_Disconnect(This->pin.pConnectedTo); IPin_Disconnect((IPin *)This); } LeaveCriticalSection(This->pin.pCritSec); @@ -1877,7 +1879,7 @@ static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { BaseOutputPinImpl_AttemptConnection, GSTOutPin_DecideBufferSize, GSTOutPin_DecideAllocator, - GSTOutPin_BreakConnect + NULL, };
static HRESULT GST_AddPin(GSTImpl *This, const PIN_INFO *piOutput, const AM_MEDIA_TYPE *amt) @@ -1920,7 +1922,7 @@ static HRESULT GST_RemoveOutputPins(GSTImpl *This) This->my_src = This->their_sink = NULL;
for (i = 0; i < This->cStreams; i++) { - hr = BaseOutputPinImpl_BreakConnect(&This->ppPins[i]->pin); + hr = break_source_connection(&This->ppPins[i]->pin); TRACE("Disconnect: %08x\n", hr); IPin_Release(&This->ppPins[i]->pin.pin.IPin_iface); }