I'm working on a project which uses multiple threads,
and each thread dynamically creates MFXVideoSession for decoding's purpose.
The problem is that whenever i try to Close() after a DisjoinSession() ,
Close() returns MFX_ERR_INVALID_HANDLE.
Eventually, memory leaks when the whole system is shutting down.
Does anyone have solution to this problem? or can give a reason why it happens?
I'll thank whomever gives it, in advance.
The version of meida sdk used is 2013 R2 by the way,
and here's my dev platform info.
OS: Win 7 (64bit)
Main Board : Asrock B75M
Mem :8 GB
Don't call DisjoinSession() before calling close. As you found out that invalidates the handle. If you have multiple sessions, create a master session, have your sessions join to that, then on close, have the joined sessions call disjoinsession, and the master session, call close().
Thank you all, andy4us and Petter Larsson!
The advice really helped me out.
To add a bit, I think intel should provide a little more specific documentation on media sdk.