strmbase/transform: Check whether the source is connected in TransformFilter_Input_Receive().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-11-22 21:14:01 -06:00 committed by Alexandre Julliard
parent b0b56001fe
commit 8bfd6d3285

View file

@ -59,6 +59,16 @@ static HRESULT WINAPI TransformFilter_Input_Receive(struct strmbase_sink *This,
TRACE("%p\n", This);
/* We do not expect pin connection state to change while the filter is
* running. This guarantee is necessary, since otherwise we would have to
* take the filter lock, and we can't take the filter lock from a streaming
* thread. */
if (!pTransform->source.pMemInputPin)
{
WARN("Source is not connected, returning VFW_E_NOT_CONNECTED.\n");
return VFW_E_NOT_CONNECTED;
}
EnterCriticalSection(&pTransform->csReceive);
if (pTransform->filter.state == State_Stopped)
{