avcodec/pnm_parser: Avoid reparsing failed data.