winegstreamer: Decommit the source allocator when cleaning up the stream.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-02-19 20:44:52 -06:00 committed by Alexandre Julliard
parent 6187ee1346
commit 540f2983a9
1 changed files with 7 additions and 0 deletions

View File

@ -1455,6 +1455,7 @@ static HRESULT gstdemux_cleanup_stream(struct strmbase_filter *iface)
{
struct gstdemux *filter = impl_from_strmbase_filter(iface);
GstStateChangeReturn ret;
unsigned int i;
if (!filter->container)
return S_OK;
@ -1468,6 +1469,12 @@ static HRESULT gstdemux_cleanup_stream(struct strmbase_filter *iface)
gst_element_get_state(filter->container, NULL, NULL, GST_CLOCK_TIME_NONE);
filter->ignore_flush = FALSE;
for (i = 0; i < filter->source_count; ++i)
{
if (filter->sources[i]->pin.pin.peer)
IMemAllocator_Decommit(filter->sources[i]->pin.pAllocator);
}
return S_OK;
}