strmbase: Forbid disconnecting the sink if the filter is not stopped.

Addendum to 2a6037e263.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-11-19 11:19:31 -06:00 committed by Alexandre Julliard
parent 7cae17c134
commit 9c2cf13170

View file

@ -887,6 +887,13 @@ static HRESULT WINAPI sink_Disconnect(IPin *iface)
EnterCriticalSection(&pin->pin.filter->csFilter);
if (pin->pin.filter->state != State_Stopped)
{
LeaveCriticalSection(&pin->pin.filter->csFilter);
WARN("Filter is not stopped; returning VFW_E_NOT_STOPPED.\n");
return VFW_E_NOT_STOPPED;
}
if (pin->pin.peer)
{
if (pin->pFuncsTable->sink_disconnect)