From 8855876934399489bbc4c8e31db642ced698265c Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 13 May 2006 22:01:36 +0200 Subject: [PATCH 1/1] add a close function for the aac audio format handler. Without this, we're leaking one fd per audio file... --- aac_afh.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aac_afh.c b/aac_afh.c index d4a1866a..5ace47e5 100644 --- a/aac_afh.c +++ b/aac_afh.c @@ -44,9 +44,12 @@ static size_t entry; static size_t *chunk_table; NeAACDecHandle handle; - static void aac_close_audio_file(void) { + if (!infile) + return; + fclose(infile); + infile = NULL; } static int aac_find_stsz(unsigned char *buf, unsigned buflen, size_t *skip) @@ -230,6 +233,7 @@ static char *aac_read_chunk(long unsigned current_chunk, ssize_t *len) return (char *)inbuf; } +/** the init function of the aac audio format handler */ void aac_afh_init(void *p) { af = p; -- 2.39.2