1
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 06:03:45 +01:00

Added support for A_AAC.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16825 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
mosu 2005-10-22 10:13:28 +00:00
parent 72fe5b36ee
commit d7a113f20d
2 changed files with 13 additions and 1 deletions

View File

@ -1773,7 +1773,8 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track)
!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 @@ demux_mkv_open_audio (demuxer_t *demuxer, mkv_track_t *track)
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);

View File

@ -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"