Propagate event manager down to opj_t2_encode_packet() and use it to emit an error...