encoder: fix cleanup deadlock race condition
playlist: fix small memory leak on cleanup