You have to compile madplay and not minimad. Minimad does almost no error recovery at all.