summaryrefslogtreecommitdiff
path: root/apps/codecs/wmapro.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/wmapro.c')
-rw-r--r--apps/codecs/wmapro.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/codecs/wmapro.c b/apps/codecs/wmapro.c
index 75bbd24cda..c02dddeeb3 100644
--- a/apps/codecs/wmapro.c
+++ b/apps/codecs/wmapro.c
@@ -48,16 +48,18 @@ enum codec_status codec_main(void)
48 48
49 49
50next_track: 50next_track:
51 retval = CODEC_OK;
51 52
52 /* Wait for the metadata to be read */ 53 /* Wait for the metadata to be read */
53 while (!*ci->taginfo_ready && !ci->stop_codec) 54 if (codec_wait_taginfo() != 0)
54 ci->sleep(1); 55 goto done;
55
56 retval = CODEC_OK;
57 56
58 /* Remember the resume position */ 57 /* Remember the resume position */
59 resume_offset = ci->id3->offset; 58 resume_offset = ci->id3->offset;
60 restart_track: 59
60restart_track:
61 retval = CODEC_OK;
62
61 if (codec_init()) { 63 if (codec_init()) {
62 LOGF("(WMA PRO) Error: Error initialising codec\n"); 64 LOGF("(WMA PRO) Error: Error initialising codec\n");
63 retval = CODEC_ERROR; 65 retval = CODEC_ERROR;
@@ -149,7 +151,6 @@ next_track:
149 /* Advance to the next logical packet */ 151 /* Advance to the next logical packet */
150 ci->advance_buffer(packetlength); 152 ci->advance_buffer(packetlength);
151 } 153 }
152 retval = CODEC_OK;
153 154
154done: 155done:
155 if (ci->request_next_track()) 156 if (ci->request_next_track())