The avifile package from http://divx.euro.ru/ (and repackaging of the library from http://Xtheater.sourceforge.net/downloads/) Compiles fine, but at runtime, locks up when trying to do playback. Package workes fine under all other Configurations except Redhat 7, including priror Redhat versions, I assume the problem is in g++ compiled code, but am not sure.
Can you please try building it with -O0 instead of -O2/3 what is used in the package? That would tell if it is an optimization thing, or either bug in the frontend or even bug in avifile itself which could be not proper C++. BTW: What exact options/input (minimal if possible) can be used to reproduce it?