mpv: Move code out of the outer loop. Check for when mpv is not playing anything.