From: Kostya Shishkov Date: Sun, 4 Oct 2020 10:43:42 +0000 (+0200) Subject: flush wavwriter data on close X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=ad8d992fda91522c4488be832e3461444669fb8f;p=nihav-tool.git flush wavwriter data on close --- diff --git a/src/wavwriter.rs b/src/wavwriter.rs index 58523b7..c0b324d 100644 --- a/src/wavwriter.rs +++ b/src/wavwriter.rs @@ -157,6 +157,7 @@ impl<'a> Drop for WavWriter<'a> { let res = self.io.write_u32le((size - 8) as u32); let res = self.io.seek(SeekFrom::Start(self.data_pos - 4)); let res = self.io.write_u32le(((size as u64) - self.data_pos) as u32); + let res = self.io.flush(); } } }