Avoid segfault when playing from http url
Also support ESC as exit key