I can indeed confirm that this is a compiler optimization bug, recompiling mpeglib with -O0 fixes the problem. Still investigating exactly which optimization is causing the bug so a report can be filed against g++.
Just in case anyone's interested, the quickly-hacked -O0 deb I'm using is here: http://www.marm.org.uk/mpeglib_3.2.2-1_i386.deb -- marm