I was trying out sample example with following setting in gcc.
g++ -ggdb -rdynamic -o $(EXEC) $(SRCS) $(CFLAGS) $(LFLAGS)
With this change, code gets stuck.
#0 0x00007ffff59a5c10 in MFXInit () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.15
#1 0x00000000004152df in MFX_DISP_HANDLE::LoadSelectedDLL(char const*, eMfxImplType, int, int, mfxInitParam&) ()
#2 0x00000000004129a5 in MFXInitEx ()
#3 0x0000000000413a7b in MFXInit ()
#4 0x000000000040c90e in MFXVideoSession::Init (this=0x7fffffffe250, impl=3, ver=0x7fffffffe200) at /opt/intel/mediasdk//include/mfxvideo++.h:45
#5 0x000000000040d891 in Initialize (impl=3, ver=..., pSession=0x7fffffffe250, pmfxAllocator=0x0, bCreateSharedHandles=false)
#6 0x000000000040c6ff in main (argc=1, argv=0x7fffffffe5b8) at src/simple_session.cpp:47
Why after MFX_DISP_HANDLE, MFXInit() calls is made again.
WIthout "rdynamic" code is working fine.
MFXInit() function name (and symbol) is used in dispatcher libmfx.a as well as in dynamic libmfxhw64-p.so. This leads to a naming conflict during runtime when using rdynamic compiler flag. The two MFXInit functions you are seeing actually belong to different libraries.
I escalated the issue to our SDK engineering team, asking for a solution/fix.
Thanks for bringing this issue up.