From 027df6d12230ffd697784ba53db5aab7a8b4af9e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 24 Nov 2004 21:40:01 +0000 Subject: [PATCH] Removed A_AAC again. Only put the AAC track's decoder_config into CodecPrivate if it contains an "unsupported" extension like parametric stereo ("unsupported" = cannot be mapped to one of the existing AAC CodecIDs). --- src/common/matroska.h | 1 - src/input/r_matroska.cpp | 11 ++--------- src/output/p_aac.cpp | 8 +++----- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/common/matroska.h b/src/common/matroska.h index 3535457a0..cd1fd3430 100644 --- a/src/common/matroska.h +++ b/src/common/matroska.h @@ -27,7 +27,6 @@ #define MKV_A_AAC_4SSR "A_AAC/MPEG4/SSR" #define MKV_A_AAC_4LTP "A_AAC/MPEG4/LTP" #define MKV_A_AAC_4SBR "A_AAC/MPEG4/LC/SBR" -#define MKV_A_AAC "A_AAC" #define MKV_A_AC3 "A_AC3" #define MKV_A_DTS "A_DTS" #define MKV_A_MP3 "A_MPEG/L3" diff --git a/src/input/r_matroska.cpp b/src/input/r_matroska.cpp index 6edbf36ac..1210c11e2 100644 --- a/src/input/r_matroska.cpp +++ b/src/input/r_matroska.cpp @@ -495,14 +495,7 @@ kax_reader_c::verify_tracks() { (t->codec_id == MKV_A_AAC_2SBR) || (t->codec_id == MKV_A_AAC_4SBR)) t->a_formattag = FOURCC('M', 'P', '4', 'A'); - else if (t->codec_id == MKV_A_AAC) { - if ((t->private_data == NULL) || (t->private_size < 2)) { - mxwarn(PFX "The AAC track number %u is missing its private " - "data. Ignoring this track.\n", t->tnum); - continue; - } - t->a_formattag = FOURCC('M', 'P', '4', 'A'); - } else if (starts_with(t->codec_id, MKV_A_REAL_COOK, + else if (starts_with(t->codec_id, MKV_A_REAL_COOK, strlen("A_REAL/"))) t->a_formattag = FOURCC('r', 'e', 'a', 'l'); else if (t->codec_id == MKV_A_FLAC) { @@ -1659,7 +1652,7 @@ kax_reader_c::create_packetizer(int64_t tid) { int channels, sfreq, osfreq; bool sbr; - if (t->codec_id == MKV_A_AAC) { + if ((t->private_data != NULL) && (ti->private_size >= 2)) { id = AAC_ID_MPEG4; if (!parse_aac_data((unsigned char *)t->private_data, t->private_size, profile, channels, sfreq, diff --git a/src/output/p_aac.cpp b/src/output/p_aac.cpp index 9219c6a43..205009b4a 100644 --- a/src/output/p_aac.cpp +++ b/src/output/p_aac.cpp @@ -126,10 +126,7 @@ aac_packetizer_c::get_aac_packet(unsigned long *header, void aac_packetizer_c::set_headers() { - if ((ti->private_size > 0) && (ti->private_size != 2) && - (ti->private_size != 5)) - set_codec_id(MKV_A_AAC); - else if (id == AAC_ID_MPEG4) { + if (id == AAC_ID_MPEG4) { if (profile == AAC_PROFILE_MAIN) set_codec_id(MKV_A_AAC_4MAIN); else if (profile == AAC_PROFILE_LC) @@ -157,7 +154,8 @@ aac_packetizer_c::set_headers() { set_audio_sampling_freq((float)samples_per_sec); set_audio_channels(channels); - if ((ti->private_data != NULL) && (ti->private_size > 0)) + if ((ti->private_data != NULL) && (ti->private_size > 0) && + (ti->private_size != 2) && (ti->private_size != 5)) set_codec_private(ti->private_data, ti->private_size); generic_packetizer_c::set_headers();