I'm have an issue getting multi-instancing working on the H.264 encoder, the problem is that the first call of:
pEncHndl = (ADICodecHandle)ADIH264ECodecNew (&gEncInstance[i], &gH264eMemMap, >MemDMA, &uiNumEncInst);
works fine, but the second time this function is called it returns NULL, I've tried using separately variables for gH264eMemMap, gtMemDMA, gH264eMemBlk and pEncHndl but it always fails at the same place. Running just one instance appears to work fine.
Each instance is being given its own area for gEncPrivData and for the reference frame, the reference frames areas are defined separately in the linker file then copied as pointers into gH264eMemBlk.pMem.
I've tried everything I can think of and been using the demo code as an example but I'm fast running out of ideas and could use a my knowledgeable opinion. So any help is appreciated, I've also attached the project to my post. Thanks.