Commit 79767218 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Make GSTOutPin_BreakConnect() a local helper.

parent f789c70d
...@@ -1829,7 +1829,7 @@ static HRESULT WINAPI GSTOutPin_DecideAllocator(BaseOutputPin *iface, IMemInputP ...@@ -1829,7 +1829,7 @@ static HRESULT WINAPI GSTOutPin_DecideAllocator(BaseOutputPin *iface, IMemInputP
return hr; return hr;
} }
static HRESULT WINAPI GSTOutPin_BreakConnect(BaseOutputPin *This) static HRESULT break_source_connection(BaseOutputPin *This)
{ {
HRESULT hr; HRESULT hr;
...@@ -1840,6 +1840,8 @@ static HRESULT WINAPI GSTOutPin_BreakConnect(BaseOutputPin *This) ...@@ -1840,6 +1840,8 @@ static HRESULT WINAPI GSTOutPin_BreakConnect(BaseOutputPin *This)
hr = VFW_E_NOT_CONNECTED; hr = VFW_E_NOT_CONNECTED;
else else
{ {
hr = IMemAllocator_Decommit(This->pAllocator);
if (SUCCEEDED(hr))
hr = IPin_Disconnect(This->pin.pConnectedTo); hr = IPin_Disconnect(This->pin.pConnectedTo);
IPin_Disconnect((IPin *)This); IPin_Disconnect((IPin *)This);
} }
...@@ -1877,7 +1879,7 @@ static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { ...@@ -1877,7 +1879,7 @@ static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
BaseOutputPinImpl_AttemptConnection, BaseOutputPinImpl_AttemptConnection,
GSTOutPin_DecideBufferSize, GSTOutPin_DecideBufferSize,
GSTOutPin_DecideAllocator, GSTOutPin_DecideAllocator,
GSTOutPin_BreakConnect NULL,
}; };
static HRESULT GST_AddPin(GSTImpl *This, const PIN_INFO *piOutput, const AM_MEDIA_TYPE *amt) 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) ...@@ -1920,7 +1922,7 @@ static HRESULT GST_RemoveOutputPins(GSTImpl *This)
This->my_src = This->their_sink = NULL; This->my_src = This->their_sink = NULL;
for (i = 0; i < This->cStreams; i++) { 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); TRACE("Disconnect: %08x\n", hr);
IPin_Release(&This->ppPins[i]->pin.pin.IPin_iface); IPin_Release(&This->ppPins[i]->pin.pin.IPin_iface);
} }
......
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