Commit 73072be1 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qcap/audiorecord: Do not leak the sample when pausing or stopping.

parent a6e96956
......@@ -602,14 +602,15 @@ static DWORD WINAPI stream_thread(void *arg)
IMediaSample_SetTime(sample, &start_pts, &end_pts);
TRACE("Sending buffer %p.\n", sample);
hr = IMemInputPin_Receive(filter->source.pMemInputPin, sample);
IMediaSample_Release(sample);
if (FAILED(hr))
if (FAILED(hr = IMemInputPin_Receive(filter->source.pMemInputPin, sample)))
{
ERR("IMemInputPin::Receive() returned %#lx.\n", hr);
IMediaSample_Release(sample);
break;
}
}
IMediaSample_Release(sample);
}
LeaveCriticalSection(&filter->state_cs);
......
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