diff options
Diffstat (limited to 'apps/codecs/wma.c')
-rw-r--r-- | apps/codecs/wma.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c index e740373cfc..1b46813444 100644 --- a/apps/codecs/wma.c +++ b/apps/codecs/wma.c | |||
@@ -46,19 +46,22 @@ enum codec_status codec_main(void) | |||
46 | ci->configure(DSP_SET_SAMPLE_DEPTH, 29); | 46 | ci->configure(DSP_SET_SAMPLE_DEPTH, 29); |
47 | 47 | ||
48 | next_track: | 48 | next_track: |
49 | retval = CODEC_OK; | ||
50 | |||
49 | /* Proper reset of the decoder context. */ | 51 | /* Proper reset of the decoder context. */ |
50 | memset(&wmadec, 0, sizeof(wmadec)); | 52 | memset(&wmadec, 0, sizeof(wmadec)); |
51 | 53 | ||
52 | /* Wait for the metadata to be read */ | 54 | /* Wait for the metadata to be read */ |
53 | while (!*ci->taginfo_ready && !ci->stop_codec) | 55 | if (codec_wait_taginfo() != 0) |
54 | ci->sleep(1); | 56 | goto done; |
55 | |||
56 | retval = CODEC_OK; | ||
57 | 57 | ||
58 | /* Remember the resume position - when the codec is opened, the | 58 | /* Remember the resume position - when the codec is opened, the |
59 | playback engine will reset it. */ | 59 | playback engine will reset it. */ |
60 | resume_offset = ci->id3->offset; | 60 | resume_offset = ci->id3->offset; |
61 | |||
61 | restart_track: | 62 | restart_track: |
63 | retval = CODEC_OK; | ||
64 | |||
62 | if (codec_init()) { | 65 | if (codec_init()) { |
63 | LOGF("WMA: Error initialising codec\n"); | 66 | LOGF("WMA: Error initialising codec\n"); |
64 | retval = CODEC_ERROR; | 67 | retval = CODEC_ERROR; |
@@ -176,7 +179,6 @@ new_packet: | |||
176 | 179 | ||
177 | ci->advance_buffer(packetlength); | 180 | ci->advance_buffer(packetlength); |
178 | } | 181 | } |
179 | retval = CODEC_OK; | ||
180 | 182 | ||
181 | done: | 183 | done: |
182 | /*LOGF("WMA: Decoded %ld samples\n",elapsedtime*wfx.rate/1000);*/ | 184 | /*LOGF("WMA: Decoded %ld samples\n",elapsedtime*wfx.rate/1000);*/ |