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.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/codecs/wav_enc.c b/apps/codecs/wav_enc.c
index 193181d825..ef1a88ec23 100644
--- a/apps/codecs/wav_enc.c
+++ b/apps/codecs/wav_enc.c
@@ -349,16 +349,10 @@ static bool init_encoder(void)
349enum codec_status codec_main(void) 349enum codec_status codec_main(void)
350{ 350{
351 if (!init_encoder()) 351 if (!init_encoder())
352 {
353 ci->enc_codec_loaded = -1;
354 return CODEC_ERROR; 352 return CODEC_ERROR;
355 }
356
357 /* main application waits for this flag during encoder loading */
358 ci->enc_codec_loaded = 1;
359 353
360 /* main encoding loop */ 354 /* main encoding loop */
361 while(!ci->stop_encoder) 355 while(!ci->stop_codec)
362 { 356 {
363 uint32_t *src; 357 uint32_t *src;
364 358
@@ -366,7 +360,7 @@ enum codec_status codec_main(void)
366 { 360 {
367 struct enc_chunk_hdr *chunk; 361 struct enc_chunk_hdr *chunk;
368 362
369 if (ci->stop_encoder) 363 if (ci->stop_codec)
370 break; 364 break;
371 365
372 chunk = ci->enc_get_chunk(); 366 chunk = ci->enc_get_chunk();
@@ -386,8 +380,5 @@ enum codec_status codec_main(void)
386 /* reset parameters to initial state */ 380 /* reset parameters to initial state */
387 ci->enc_set_parameters(NULL); 381 ci->enc_set_parameters(NULL);
388 382
389 /* main application waits for this flag during encoder removing */
390 ci->enc_codec_loaded = 0;
391
392 return CODEC_OK; 383 return CODEC_OK;
393} /* codec_start */ 384} /* codec_start */