summaryrefslogtreecommitdiff
path: root/apps/codecs/libm4a/m4a.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libm4a/m4a.h')
-rw-r--r--apps/codecs/libm4a/m4a.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/codecs/libm4a/m4a.h b/apps/codecs/libm4a/m4a.h
index 401cff3b7a..a4d4dc0f79 100644
--- a/apps/codecs/libm4a/m4a.h
+++ b/apps/codecs/libm4a/m4a.h
@@ -23,6 +23,19 @@
23#include <codecs.h> 23#include <codecs.h>
24#include <inttypes.h> 24#include <inttypes.h>
25 25
26/* AAC codecdata appears to always be less than 8 bytes - see
27 AudioSpecificConfig2 in libfaad/mp4.c
28
29 ALAC codecdata appears to always be 44 bytes (see alac_set_info in
30 libalac/alac.c) but my test file contains 56 bytes.
31
32 So we go safe and round up to 64 bytes - if we find more than this,
33 we give an error (even though we could possibly continue), so we
34 can increase this buffer.
35*/
36
37#define MAX_CODECDATA_SIZE 64
38
26typedef struct { 39typedef struct {
27 struct codec_api* ci; 40 struct codec_api* ci;
28 int eof; 41 int eof;
@@ -57,7 +70,7 @@ typedef struct
57 uint32_t num_sample_byte_sizes; 70 uint32_t num_sample_byte_sizes;
58 71
59 uint32_t codecdata_len; 72 uint32_t codecdata_len;
60 void *codecdata; 73 uint8_t codecdata[MAX_CODECDATA_SIZE];
61 74
62 int mdat_offset; 75 int mdat_offset;
63 uint32_t mdat_len; 76 uint32_t mdat_len;