So, I am calling MFXMuxer_Init from within a function in a C dll, everything seems to execute fine until it reaches this line:
MFXMuxer_Init(streamParams, (mfxDataIO *)curBitstream, muxer);
At that point C# throws either AccessViolationException or SEHException for function that is calling it.
Any thoughts regarding what could be going on?
I have placed the code proceeding this that sets up streamParams and calls this function here: http://pastebin.com/3WVr64rP
Here is the BitstreamIO class: http://pastebin.com/t6QDjhrB
Thank you!