From cbee7a69448467ca615a53fd3927b53b1547509d Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Thu, 9 Nov 2006 11:37:30 +0000 Subject: 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 --- libavformat/avidec.c | 3 +++ libavformat/matroska.c | 5 ++--- libavformat/riff.c | 2 +- libavformat/rtp.c | 6 +++--- libavformat/rtsp.c | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) (limited to 'libavformat') 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); -- cgit v1.1