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