Commit e2a4b8a5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

evr/mixer: Drop input samples on flush.

parent c1e57ea2
......@@ -949,6 +949,7 @@ static HRESULT WINAPI video_mixer_transform_ProcessMessage(IMFTransform *iface,
{
struct video_mixer *mixer = impl_from_IMFTransform(iface);
HRESULT hr = S_OK;
unsigned int i;
TRACE("%p, %u, %#lx.\n", iface, message, param);
......@@ -966,6 +967,23 @@ static HRESULT WINAPI video_mixer_transform_ProcessMessage(IMFTransform *iface,
break;
case MFT_MESSAGE_COMMAND_FLUSH:
EnterCriticalSection(&mixer->cs);
for (i = 0; i < mixer->input_count; ++i)
{
if (mixer->inputs[i].sample)
{
IMFSample_Release(mixer->inputs[i].sample);
mixer->inputs[i].sample = NULL;
}
}
LeaveCriticalSection(&mixer->cs);
break;
case MFT_MESSAGE_COMMAND_DRAIN:
break;
......
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