Hi all,
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)
CPU: i7-3770
Main Board : Asrock B75M
Mem :8 GB
Regards, David
Link Copied
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().
Hi,
Also make sure you do not close the parent session until all child sessions are disjoined or closed.
Regards,
Petter
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.
Regards, David
For more complete information about compiler optimizations, see our Optimization Notice.