]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aac_afh.c
afs: com_add() fixes and improvements.
[paraslash.git] / aac_afh.c
index be301c5ce38f530bf29ddef4781f89c4d2b4926b..85bad6d98ce8eb80c0d35ba3d1d4cbdce8e5fdc3 100644 (file)
--- a/aac_afh.c
+++ b/aac_afh.c
@@ -10,6 +10,8 @@
 
 /** \file aac_afh.c para_server's aac audio format handler */
 
+#include "para.h"
+#include "afh.h"
 #include "server.h"
 #include "error.h"
 #include "string.h"
@@ -98,7 +100,7 @@ static int aac_get_file_info(char *map, size_t numbytes,
        unsigned long rate = 0, decoder_len;
        unsigned char channels = 0;
        mp4AudioSpecificConfig mp4ASC;
-       NeAACDecHandle handle;
+       NeAACDecHandle handle = NULL;
        unsigned char *umap = (unsigned char *) map;
 
        ret = aac_find_esds(umap, numbytes, &skip, &decoder_len);
@@ -144,6 +146,8 @@ static int aac_get_file_info(char *map, size_t numbytes,
        tv_scale(20, &afi->chunk_tv, &afi->eof_tv);
        ret = 1;
 out:
+       if (handle)
+               NeAACDecClose(handle);
        return ret;
 }