[SCM] libav/experimental: get rid of CODEC_ID_MPEG4AAC after next version bump, and change it to CODEC_ID_AAC where used

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:53:08 UTC 2013


The following commit has been merged in the experimental branch:
commit cbee7a69448467ca615a53fd3927b53b1547509d
Author: Baptiste Coudurier <baptiste.coudurier at gmail.com>
Date:   Thu Nov 9 11:37:30 2006 +0000

    get rid of CODEC_ID_MPEG4AAC after next version bump, and change it to CODEC_ID_AAC where used
    
    Originally committed as revision 6954 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 6330322..ac128ec 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -206,7 +206,9 @@ enum CodecID {
     CODEC_ID_MP2= 0x15000,
     CODEC_ID_MP3, /* prefered ID for MPEG Audio layer 1, 2 or3 decoding */
     CODEC_ID_AAC,
+#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
     CODEC_ID_MPEG4AAC,
+#endif
     CODEC_ID_AC3,
     CODEC_ID_DTS,
     CODEC_ID_VORBIS,
diff --git a/libavcodec/faad.c b/libavcodec/faad.c
index fcea1c8..df33ea0 100644
--- a/libavcodec/faad.c
+++ b/libavcodec/faad.c
@@ -326,7 +326,9 @@ AVCodec name ## _decoder = {    \
 
 // FIXME - raw AAC files - maybe just one entry will be enough
 AAC_CODEC(CODEC_ID_AAC, aac);
+#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
 // If it's mp4 file - usually embeded into Qt Mov
 AAC_CODEC(CODEC_ID_MPEG4AAC, mpeg4aac);
+#endif
 
 #undef AAC_CODEC
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 457cda8..dfbe5c6 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -443,6 +443,9 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
                     /* 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)
diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index b798275..9de257c 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -222,8 +222,7 @@ static CodecTags codec_tags[]={
     {"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 @@ matroska_read_header (AVFormatContext    *s,
 
             }
 
-            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);
diff --git a/libavformat/riff.c b/libavformat/riff.c
index ec9abda..fb2a7fc 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -186,7 +186,7 @@ const CodecTag codec_wav_tags[] = {
     { 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 },
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index 7bef395..37a2862 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -186,7 +186,7 @@ AVRtpPayloadType_t AVRtpPayloadTypes[]=
 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 @@ static void finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t timestam
                 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 @@ int rtp_parse_packet(RTPDemuxContext *s, AVPacket *pkt,
             // 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;
             {
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 6c01f5e..4c99a17 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -251,7 +251,7 @@ static void sdp_parse_fmtp_config(AVCodecContext *codec, char *attr, char *value
 {
     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);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list