No, sorry, I meant you need to recompile L-SMASH (not L-SMASH Works) as shared, not ffmpeg. But I think that's wrong too, it's just that if you do that it
automatically adds -fPIC to CFLAGS and LDFLAGS. Static with adding -fPIC via --extra-cflags/ldflags would most likely work too, as you say.