Workaround ffms behavior of returning EAGAIN at EOF.