Interesting approach, but what stops the client from using this to his advantage? "Hmm, if I fail to pay, the code becomes open-source, and then I can use it for free."
Depends on how much they want to deter competition. This particular company was a hardware video switch; competitors could easily port the same app to their machines and then the client loses the advantage they had previously.