summaryrefslogtreecommitdiff
path: root/apps/codecs/wav_enc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/wav_enc.c')
-rw-r--r--apps/codecs/wav_enc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/codecs/wav_enc.c b/apps/codecs/wav_enc.c
index a11aaa07d6..eb43f8b240 100644
--- a/apps/codecs/wav_enc.c
+++ b/apps/codecs/wav_enc.c
@@ -144,8 +144,7 @@ static bool on_end_file(struct enc_file_event_data *data)
144 struct riff_header hdr; 144 struct riff_header hdr;
145 uint32_t data_size; 145 uint32_t data_size;
146 146
147 if (!is_file_data_ok(data)) 147 /* always _try_ to write the file header, even on error */
148 return false;
149 148
150 if (ci->lseek(data->rec_file, 0, SEEK_SET) != 0 || 149 if (ci->lseek(data->rec_file, 0, SEEK_SET) != 0 ||
151 ci->read(data->rec_file, &hdr, sizeof (hdr)) != sizeof (hdr)) 150 ci->read(data->rec_file, &hdr, sizeof (hdr)) != sizeof (hdr))
@@ -387,7 +386,7 @@ enum codec_status codec_main(void)
387 386
388 /* reset parameters to initial state */ 387 /* reset parameters to initial state */
389 ci->enc_set_parameters(NULL); 388 ci->enc_set_parameters(NULL);
390 389
391 /* main application waits for this flag during encoder removing */ 390 /* main application waits for this flag during encoder removing */
392 ci->enc_codec_loaded = 0; 391 ci->enc_codec_loaded = 0;
393 392