I've been writing an avi player using OpenGL/GLUT and the avifile-0.7library.
I looked for a way to specify a Draw callback, but that doesn't seem to
exist nowadays. So I wrote my own video renderer class (implements
IVideoRenderer) and added an instance of that to the AviPlayer's list of
All of this works fine, but not when using the XVID4 codec. The player
starts up, but segfaults before displaying any frames. I ran GDB, and found
it segfaulted in the process running the yv12_to_yv12_xmm function:
Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1301468240 (LWP 5748)]
> 0x00c1d8aa in yv12_to_yv12_xmm () from /usr/lib/libxvidcore.so.4
It's quite frustrating, because the aviplay example works fine using the
same XVID4-encoded videos that make my program segfault :) Of course, the
aviplay example uses IAviPlayer2, which does video rendering for you.