summaryrefslogtreecommitdiff
path: root/apps/codecs/au.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/au.c')
-rw-r--r--apps/codecs/au.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/codecs/au.c b/apps/codecs/au.c
index 1e6af25924..3f9436c9e7 100644
--- a/apps/codecs/au.c
+++ b/apps/codecs/au.c
@@ -108,7 +108,7 @@ static int convert_au_format(unsigned int encoding, struct pcm_format *fmt)
108/* this is the codec entry point */ 108/* this is the codec entry point */
109enum codec_status codec_main(void) 109enum codec_status codec_main(void)
110{ 110{
111 int status = CODEC_OK; 111 int status;
112 struct pcm_format format; 112 struct pcm_format format;
113 uint32_t bytesdone, decodedsamples; 113 uint32_t bytesdone, decodedsamples;
114 size_t n; 114 size_t n;
@@ -124,14 +124,16 @@ enum codec_status codec_main(void)
124 ci->configure(DSP_SET_SAMPLE_DEPTH, PCM_OUTPUT_DEPTH-1); 124 ci->configure(DSP_SET_SAMPLE_DEPTH, PCM_OUTPUT_DEPTH-1);
125 125
126next_track: 126next_track:
127 status = CODEC_OK;
128
127 if (codec_init()) { 129 if (codec_init()) {
128 DEBUGF("codec_init() error\n"); 130 DEBUGF("codec_init() error\n");
129 status = CODEC_ERROR; 131 status = CODEC_ERROR;
130 goto exit; 132 goto exit;
131 } 133 }
132 134
133 while (!*ci->taginfo_ready && !ci->stop_codec) 135 if (codec_wait_taginfo() != 0)
134 ci->sleep(1); 136 goto done;
135 137
136 codec_set_replaygain(ci->id3); 138 codec_set_replaygain(ci->id3);
137 139
@@ -304,7 +306,6 @@ next_track:
304 endofstream = 1; 306 endofstream = 1;
305 ci->set_elapsed(decodedsamples*1000LL/ci->id3->frequency); 307 ci->set_elapsed(decodedsamples*1000LL/ci->id3->frequency);
306 } 308 }
307 status = CODEC_OK;
308 309
309done: 310done:
310 if (ci->request_next_track()) 311 if (ci->request_next_track())