void   EndAvi()

Close the avi file, and releases the memory.