encoder: create new AVFormatContext on flush and playlist end

Closes #66