From 1060e447f83128a78dfaa8d59ba0baa642d15a4d Mon Sep 17 00:00:00 2001 From: Brandon Low Date: Wed, 18 Jan 2006 20:22:03 +0000 Subject: 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 --- apps/codecs/a52.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'apps/codecs/a52.c') 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; } -- cgit v1.2.3