Fixed an issue where audio sample buffers were being invalidated earlier than they should be on movie writing, leading to errors and crashes.