evr/mixer: Drop input samples on flush.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c1e57ea291
commit
e2a4b8a563
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue