When using the H264 decoder build from the UMC sample library I get an error when trying to initialize the H264 decoder class. I tracked down the error as far as the NALUnitSplitter and can reproduce it with the following code:
> test_IsrImage.exe!std::_Vector_const_iterator >::_Vector_const_iterator >(unsigned char * _Ptr=0x0000000000000000, const std::_Container_base_secure * _Pvector=0x0000000000ddf540) Line 70 + 0x5a bytes C++ test_IsrImage.exe!std::_Vector_iterator >::_Vector_iterator >(unsigned char * _Ptr=0x0000000000000000, const std::_Container_base_secure * _Pvector=0x0000000000ddf540) Line 322 C++ test_IsrImage.exe!std::vector >::end() Line 651 + 0x18 bytes C++ test_IsrImage.exe!std::vector >::clear() Line 1065 + 0x26 bytes C++ test_IsrImage.exe!UMC::StartCodeIterator1::StartCodeIterator1() + 0x96 bytes C++ test_IsrImage.exe!UMC::NALUnitSplitter::Init() + 0x68 bytes C++ test_IsrImage.exe!main(int argc=1, char * * argv=0x0000000000dd8e50) Line 97 C++ test_IsrImage.exe!__tmainCRTStartup() Line 582 + 0x19 bytes C test_IsrImage.exe!mainCRTStartup() Line 399 C kernel32.dll!00000000772d652d() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] ntdll.dll!00000000778cc521()
I am building the UMC library statically in debug mode, Windows 64 bit. I get the exact same error using version 7.0.3.050 and version 7.0.5.059. The H264 encoder is working fine and we were able to get the decoder working in our old 32 bit codebase. Has anyone seen this issue before?
After a lot of rebuilding the decoder is now working. I'm not sure what the exact problem was but there are two issues I identified:
- A piece of code setting the decoder parameters pPostProcessing field caused the decoder to fail with an invalid stream error. The code used to work on our Win32 setup but removing it and leaving the field as the default fixed the problem.
- The H264 Encoder and Decoder in the UMC library have some conflicting names which causes building to fail if both are included from the same file. In trying to fix this by renaming the objects I ended up using diffirent include files from the one I had built the library with.