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) |
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) long n; unsigned char *filebuf; int sample_loc; + int retval; /* Generic codec initialisation */ ci = api; @@ -147,8 +148,10 @@ enum codec_status codec_start(struct codec_api *api) ci->configure(CODEC_SET_FILEBUF_CHUNKSIZE, (long *)(1024*128)); next_track: - if (codec_init(api)) - return CODEC_ERROR; + if (codec_init(api)) { + retval = CODEC_ERROR; + goto exit; + } while (!ci->taginfo_ready) ci->yield(); @@ -184,6 +187,8 @@ next_track: } if (ci->request_next_track()) goto next_track; + retval = CODEC_OK; +exit: a52_free(state); - return CODEC_OK; + return retval; } |