diff options
author | v0lt <v0lt@users.sourceforge.net> | 2012-05-24 06:04:54 +0400 |
---|---|---|
committer | v0lt <v0lt@users.sourceforge.net> | 2012-05-24 06:04:54 +0400 |
commit | 07365b3cb7a1abd0e5c7df412441e1b93f8d98fd (patch) | |
tree | 5af6a2078ff8b8e17785859c2d66e409c9725175 /src/filters/parser/BaseSplitter | |
parent | b0ed1a6a523a9c950a938978d90d1fa7a569c19b (diff) |
AudioParser: added support for MLP
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4865 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/BaseSplitter')
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp index 35ad18793..501a9515c 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp @@ -697,17 +697,18 @@ bool CBaseSplitterFileEx::Read(ac3hdr& h, int len, CMediaType* pmt, bool find_sy memset(&h, 0, sizeof(h));
- // Parse TrueHD header
+ // Parse TrueHD and MLP header
if (!AC3CoreOnly) {
BYTE buf[20];
int m_channels;
int m_samplerate;
int m_framelength;
+ bool isTrueHD;
int fsize = 0;
ByteRead(buf, 20);
- fsize = ParseTrueHDHeader(buf, &m_samplerate, &m_channels, &m_framelength);
+ fsize = ParseMLPHeader(buf, &m_samplerate, &m_channels, &m_framelength, &isTrueHD);
if (fsize) {
if (!pmt) {
@@ -717,7 +718,7 @@ bool CBaseSplitterFileEx::Read(ac3hdr& h, int len, CMediaType* pmt, bool find_sy int m_bitrate = int ((fsize) * 8i64 * m_samplerate / m_framelength);
pmt->majortype = MEDIATYPE_Audio;
- pmt->subtype = MEDIASUBTYPE_DOLBY_TRUEHD;
+ pmt->subtype = isTrueHD ? MEDIASUBTYPE_DOLBY_TRUEHD : MEDIASUBTYPE_MLP;
pmt->formattype = FORMAT_WaveFormatEx;
WAVEFORMATEX* wfe = (WAVEFORMATEX*)pmt->AllocFormatBuffer(sizeof(WAVEFORMATEX));
|