diff options
Diffstat (limited to 'apps/codecs/wavpack_enc.c')
-rw-r--r-- | apps/codecs/wavpack_enc.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/codecs/wavpack_enc.c b/apps/codecs/wavpack_enc.c index 66263cf1a1..d908e284be 100644 --- a/apps/codecs/wavpack_enc.c +++ b/apps/codecs/wavpack_enc.c | |||
@@ -393,16 +393,10 @@ enum codec_status codec_main(void) | |||
393 | { | 393 | { |
394 | /* initialize params and config */ | 394 | /* initialize params and config */ |
395 | if (!init_encoder()) | 395 | if (!init_encoder()) |
396 | { | ||
397 | ci->enc_codec_loaded = -1; | ||
398 | return CODEC_ERROR; | 396 | return CODEC_ERROR; |
399 | } | ||
400 | |||
401 | /* main application waits for this flag during encoder loading */ | ||
402 | ci->enc_codec_loaded = 1; | ||
403 | 397 | ||
404 | /* main encoding loop */ | 398 | /* main encoding loop */ |
405 | while(!ci->stop_encoder) | 399 | while(!ci->stop_codec) |
406 | { | 400 | { |
407 | uint8_t *src; | 401 | uint8_t *src; |
408 | 402 | ||
@@ -413,7 +407,7 @@ enum codec_status codec_main(void) | |||
413 | uint8_t *dst; | 407 | uint8_t *dst; |
414 | uint8_t *src_end; | 408 | uint8_t *src_end; |
415 | 409 | ||
416 | if(ci->stop_encoder) | 410 | if(ci->stop_codec) |
417 | break; | 411 | break; |
418 | 412 | ||
419 | abort_chunk = true; | 413 | abort_chunk = true; |
@@ -442,7 +436,7 @@ enum codec_status codec_main(void) | |||
442 | chunk->num_pcm += PCM_SAMP_PER_CHUNK/4; | 436 | chunk->num_pcm += PCM_SAMP_PER_CHUNK/4; |
443 | ci->yield(); | 437 | ci->yield(); |
444 | /* could've been stopped in some way */ | 438 | /* could've been stopped in some way */ |
445 | abort_chunk = ci->stop_encoder || | 439 | abort_chunk = ci->stop_codec || |
446 | (chunk->flags & CHUNKF_ABORT); | 440 | (chunk->flags & CHUNKF_ABORT); |
447 | } | 441 | } |
448 | 442 | ||
@@ -467,8 +461,5 @@ enum codec_status codec_main(void) | |||
467 | /* reset parameters to initial state */ | 461 | /* reset parameters to initial state */ |
468 | ci->enc_set_parameters(NULL); | 462 | ci->enc_set_parameters(NULL); |
469 | 463 | ||
470 | /* main application waits for this flag during encoder removing */ | ||
471 | ci->enc_codec_loaded = 0; | ||
472 | |||
473 | return CODEC_OK; | 464 | return CODEC_OK; |
474 | } /* codec_start */ | 465 | } /* codec_start */ |