changeset 16824:ab1eb8054890

Added support for A_AAC.
author mosu
date Sat, 22 Oct 2005 10:13:28 +0000
parents 850947f65258
children 657f55c92d4c
files libmpdemux/demux_mkv.c libmpdemux/matroska.h
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Fri Oct 21 14:44:13 2005 +0000
+++ b/libmpdemux/demux_mkv.c	Sat Oct 22 10:13:28 2005 +0000
@@ -1773,7 +1773,8 @@
                !strncmp(track->codec_id, MKV_A_AAC_4LC,
                         strlen(MKV_A_AAC_4LC)) ||
                !strcmp(track->codec_id, MKV_A_AAC_4SSR) ||
-               !strcmp(track->codec_id, MKV_A_AAC_4LTP))
+               !strcmp(track->codec_id, MKV_A_AAC_4LTP) ||
+               !strcmp(track->codec_id, MKV_A_AAC))
         track->a_formattag = mmioFOURCC('M', 'P', '4', 'A');
       else if (!strcmp(track->codec_id, MKV_A_VORBIS))
         {
@@ -1874,6 +1875,16 @@
       sh_a->wf->nAvgBytesPerSec = 16000;
       sh_a->wf->nBlockAlign = 1024;
 
+      if (!strcmp (track->codec_id, MKV_A_AAC) &&
+          (NULL != track->private_data))
+        {
+          sh_a->codecdata=(unsigned char *)malloc(track->private_size);
+          memcpy (sh_a->codecdata, track->private_data,
+                  track->private_size);
+          sh_a->codecdata_len = track->private_size;
+          return 0;
+        }
+
       /* Recreate the 'private data' */
       /* which faad2 uses in its initialization */
       srate_idx = aac_get_sample_rate_index (sh_a->samplerate);
--- a/libmpdemux/matroska.h	Fri Oct 21 14:44:13 2005 +0000
+++ b/libmpdemux/matroska.h	Sat Oct 22 10:13:28 2005 +0000
@@ -18,6 +18,7 @@
 #define MKV_A_AAC_4SBR   "A_AAC/MPEG4/LC/SBR"
 #define MKV_A_AAC_4SSR   "A_AAC/MPEG4/SSR"
 #define MKV_A_AAC_4LTP   "A_AAC/MPEG4/LTP"
+#define MKV_A_AAC        "A_AAC"
 #define MKV_A_AC3        "A_AC3"
 #define MKV_A_DTS        "A_DTS"
 #define MKV_A_MP2        "A_MPEG/L2"