diff options
Diffstat (limited to 'apps/codecs/wav_enc.c')
-rw-r--r-- | apps/codecs/wav_enc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/codecs/wav_enc.c b/apps/codecs/wav_enc.c index ff77f137d2..a11aaa07d6 100644 --- a/apps/codecs/wav_enc.c +++ b/apps/codecs/wav_enc.c | |||
@@ -169,13 +169,12 @@ static bool on_end_file(struct enc_file_event_data *data) | |||
169 | hdr.data_size = htole32(data_size); | 169 | hdr.data_size = htole32(data_size); |
170 | 170 | ||
171 | if (ci->lseek(data->rec_file, 0, SEEK_SET) != 0 || | 171 | if (ci->lseek(data->rec_file, 0, SEEK_SET) != 0 || |
172 | ci->write(data->rec_file, &hdr, sizeof (hdr)) != sizeof (hdr)) | 172 | ci->write(data->rec_file, &hdr, sizeof (hdr)) != sizeof (hdr) || |
173 | ci->close(data->rec_file) != 0) | ||
173 | { | 174 | { |
174 | return false; | 175 | return false; |
175 | } | 176 | } |
176 | 177 | ||
177 | ci->fsync(data->rec_file); | ||
178 | ci->close(data->rec_file); | ||
179 | data->rec_file = -1; | 178 | data->rec_file = -1; |
180 | 179 | ||
181 | return true; | 180 | return true; |