diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-01-18 20:22:03 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-01-18 20:22:03 +0000 |
commit | 1060e447f83128a78dfaa8d59ba0baa642d15a4d (patch) | |
tree | 9af0876f9c5d0ad5cb8bfc2adc7b1653c43013ff /apps/codecs/a52.c | |
parent | 3ded3cea756d8290372b808884837931a7e8cf1a (diff) | |
download | rockbox-1060e447f83128a78dfaa8d59ba0baa642d15a4d.tar.gz rockbox-1060e447f83128a78dfaa8d59ba0baa642d15a4d.zip |
Part of the profiling patch to use a consistent return path in all codecs to facilitate 'on exit' functionality
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8374 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/a52.c')
-rw-r--r-- | apps/codecs/a52.c | 11 |
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 | ||
149 | next_track: | 150 | next_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; | ||
191 | exit: | ||
187 | a52_free(state); | 192 | a52_free(state); |
188 | return CODEC_OK; | 193 | return retval; |
189 | } | 194 | } |