summaryrefslogtreecommitdiff
path: root/apps/codecs/a52.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/a52.c')
-rw-r--r--apps/codecs/a52.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c
index f12fce1027..ff8fe0afea 100644
--- a/apps/codecs/a52.c
+++ b/apps/codecs/a52.c
@@ -129,6 +129,7 @@ enum codec_status codec_start(struct codec_api *api)
129 long n; 129 long n;
130 unsigned char *filebuf; 130 unsigned char *filebuf;
131 int sample_loc; 131 int sample_loc;
132 int retval;
132 133
133 /* Generic codec initialisation */ 134 /* Generic codec initialisation */
134 ci = api; 135 ci = api;
@@ -147,8 +148,10 @@ enum codec_status codec_start(struct codec_api *api)
147 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*128)); 148 ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*128));
148 149
149next_track: 150next_track:
150 if (codec_init(api)) 151 if (codec_init(api)) {
151 return CODEC_ERROR; 152 retval = CODEC_ERROR;
153 goto exit;
154 }
152 155
153 while (!ci->taginfo_ready) 156 while (!ci->taginfo_ready)
154 ci->yield(); 157 ci->yield();
@@ -184,6 +187,8 @@ next_track:
184 } 187 }
185 if (ci->request_next_track()) 188 if (ci->request_next_track())
186 goto next_track; 189 goto next_track;
190 retval = CODEC_OK;
191exit:
187 a52_free(state); 192 a52_free(state);
188 return CODEC_OK; 193 return retval;
189} 194}