summaryrefslogtreecommitdiff
path: root/apps/codecs/vorbis.c
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-01-18 20:22:03 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-01-18 20:22:03 +0000
commit1060e447f83128a78dfaa8d59ba0baa642d15a4d (patch)
tree9af0876f9c5d0ad5cb8bfc2adc7b1653c43013ff /apps/codecs/vorbis.c
parent3ded3cea756d8290372b808884837931a7e8cf1a (diff)
downloadrockbox-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/vorbis.c')
-rw-r--r--apps/codecs/vorbis.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c
index fdd7a952d4..e77ecada0c 100644
--- a/apps/codecs/vorbis.c
+++ b/apps/codecs/vorbis.c
@@ -145,11 +145,11 @@ enum codec_status codec_start(struct codec_api *api)
145 */ 145 */
146 rb->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*256)); 146 rb->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*256));
147 147
148
149/* We need to flush reserver memory every track load. */ 148/* We need to flush reserver memory every track load. */
150next_track: 149next_track:
151 if (codec_init(rb)) { 150 if (codec_init(rb)) {
152 return CODEC_ERROR; 151 error = CODEC_ERROR;
152 goto exit;
153 } 153 }
154 154
155 while (!*rb->taginfo_ready && !rb->stop_codec) 155 while (!*rb->taginfo_ready && !rb->stop_codec)
@@ -195,7 +195,8 @@ next_track:
195 vf.links = 1; 195 vf.links = 1;
196 } else { 196 } else {
197 //rb->logf("ov_open: %d", error); 197 //rb->logf("ov_open: %d", error);
198 return CODEC_ERROR; 198 error = CODEC_ERROR;
199 goto exit;
199 } 200 }
200 201
201 if (rb->id3->offset) { 202 if (rb->id3->offset) {
@@ -224,7 +225,8 @@ next_track:
224 /* Change DSP and buffer settings for this bitstream */ 225 /* Change DSP and buffer settings for this bitstream */
225 if (current_section != previous_section) { 226 if (current_section != previous_section) {
226 if (!vorbis_set_codec_parameters(&vf)) { 227 if (!vorbis_set_codec_parameters(&vf)) {
227 return CODEC_ERROR; 228 error = CODEC_ERROR;
229 goto exit;
228 } else { 230 } else {
229 previous_section = current_section; 231 previous_section = current_section;
230 } 232 }
@@ -255,6 +257,8 @@ next_track:
255 goto next_track; 257 goto next_track;
256 } 258 }
257 259
258 return CODEC_OK; 260 error = CODEC_OK;
261exit:
262 return error;
259} 263}
260 264