playlist: fix race condition which can cause decoder to hang