Flush the encoder before inserting keyframes.