Skip to content
Snippets Groups Projects
Commit 56043d70 authored by Steve Lhomme's avatar Steve Lhomme Committed by Hugo Beauzée-Luyssen
Browse files

mft: do the D3D Manager cleaning after the endStreaming

The MFT_MESSAGE_NOTIFY_END_STREAMING actually does some D3D cleaning as well.

+ don't crash if DoRelease was called due to an error.

+ don't reset the input/output types anymore.
parent 407b1df1
No related branches found
No related tags found
No related merge requests found
......@@ -132,14 +132,17 @@ struct decoder_sys_t
void DoRelease()
{
mft->SetInputType(input_stream_id, nullptr, 0);
mft->SetOutputType(output_stream_id, nullptr, 0);
if (output_sample.Get())
output_sample->RemoveAllBuffers();
if (vctx_out)
mft->ProcessMessage(MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)0);
if (mft.Get())
{
// mft->SetInputType(input_stream_id, nullptr, 0);
// mft->SetOutputType(output_stream_id, nullptr, 0);
if (vctx_out)
mft->ProcessMessage(MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)0);
}
for (size_t i=0; i < ARRAY_SIZE(cachedSRV); i++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment