changeset 1472:49d5a5ca2987 libavformat

get rid of CODEC_ID_MPEG4AAC after next version bump, and change it to CODEC_ID_AAC where used
author bcoudurier
date Thu, 09 Nov 2006 11:37:30 +0000
parents ad18f1010f47
children 927cc72c6cac
files avidec.c matroska.c riff.c rtp.c rtsp.c
diffstat 5 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/avidec.c	Thu Nov 09 00:09:27 2006 +0000
+++ b/avidec.c	Thu Nov 09 11:37:30 2006 +0000
@@ -443,6 +443,9 @@
                     /* special case time: To support Xan DPCM, hardcode
                      * the format if Xxan is the video codec */
                     st->need_parsing = 1;
+                    /* ADTS header is in extradata, AAC without header must be stored as exact frames, parser not needed and it will fail */
+                    if (st->codec->codec_id == CODEC_ID_AAC && st->codec->extradata_size)
+                        st->need_parsing = 0;
                     /* force parsing as several audio frames can be in
                        one packet */
                     if (xan_video)
--- a/matroska.c	Thu Nov 09 00:09:27 2006 +0000
+++ b/matroska.c	Thu Nov 09 11:37:30 2006 +0000
@@ -222,8 +222,7 @@
     {"A_AC3"            , CODEC_ID_AC3},
     {"A_DTS"            , CODEC_ID_DTS},
     {"A_VORBIS"         , CODEC_ID_VORBIS},
-    {"A_AAC/MPEG2/"     , CODEC_ID_AAC},
-    {"A_AAC/MPEG4/"     , CODEC_ID_MPEG4AAC},
+    {"A_AAC/"           , CODEC_ID_AAC},
     {"A_WAVPACK4"       , CODEC_ID_WAVPACK},
     {NULL               , CODEC_ID_NONE}
 /* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */
@@ -2246,7 +2245,7 @@
 
             }
 
-            if (codec_id==CODEC_ID_AAC || codec_id==CODEC_ID_MPEG4AAC) {
+            if (codec_id==CODEC_ID_AAC) {
                 MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *) track;
                 int profile = matroska_aac_profile(track->codec_id);
                 int sri = matroska_aac_sri(audiotrack->internal_samplerate);
--- a/riff.c	Thu Nov 09 00:09:27 2006 +0000
+++ b/riff.c	Thu Nov 09 11:37:30 2006 +0000
@@ -186,7 +186,7 @@
     { CODEC_ID_WMAV1, 0x160 },
     { CODEC_ID_WMAV2, 0x161 },
     { CODEC_ID_AAC, 0x706d },
-    { CODEC_ID_MPEG4AAC, 0xff },
+    { CODEC_ID_AAC, 0xff },
     { CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id?
     { CODEC_ID_SONIC, 0x2048 },
     { CODEC_ID_SONIC_LS, 0x2048 },
--- a/rtp.c	Thu Nov 09 00:09:27 2006 +0000
+++ b/rtp.c	Thu Nov 09 11:37:30 2006 +0000
@@ -186,7 +186,7 @@
 RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler= NULL;
 
 static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", CODEC_TYPE_VIDEO, CODEC_ID_MPEG4};
-static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", CODEC_TYPE_AUDIO, CODEC_ID_MPEG4AAC};
+static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", CODEC_TYPE_AUDIO, CODEC_ID_AAC};
 
 static void register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler)
 {
@@ -564,7 +564,7 @@
                 pkt->pts = addend + delta_timestamp;
             }
             break;
-        case CODEC_ID_MPEG4AAC:
+        case CODEC_ID_AAC:
         case CODEC_ID_H264:
         case CODEC_ID_MPEG4:
             pkt->pts = timestamp;
@@ -694,7 +694,7 @@
             // moved from below, verbatim.  this is because this section handles packets, and the lower switch handles
             // timestamps.
             // TODO: Put this into a dynamic packet handler...
-        case CODEC_ID_MPEG4AAC:
+        case CODEC_ID_AAC:
             if (rtp_parse_mp4_au(s, buf))
                 return -1;
             {
--- a/rtsp.c	Thu Nov 09 00:09:27 2006 +0000
+++ b/rtsp.c	Thu Nov 09 11:37:30 2006 +0000
@@ -251,7 +251,7 @@
 {
     switch (codec->codec_id) {
         case CODEC_ID_MPEG4:
-        case CODEC_ID_MPEG4AAC:
+        case CODEC_ID_AAC:
             if (!strcmp(attr, "config")) {
                 /* decode the hexa encoded parameter */
                 int len = hex_to_data(NULL, value);