Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksoid <aleksoid@users.sourceforge.net>2010-09-15 16:08:14 +0400
committerAleksoid <aleksoid@users.sourceforge.net>2010-09-15 16:08:14 +0400
commit9d27c5bde555f426f011c1243ed7860545acbb38 (patch)
tree926456b7cf98df47647408308526f9537a2bb30c /src
parent78faa0abf318a8e056c25a9e18d8cccdcfcd2e6b (diff)
Fix : EAC3 is detected as Dolby Digital instead of Dolby Digital Plus, ticket #699
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2555 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r--src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp7
-rw-r--r--src/filters/parser/MpegSplitter/MpegSplitter.cpp4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
index 9f134e28a..85e259fc3 100644
--- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
+++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp
@@ -593,6 +593,7 @@ bool CBaseSplitterFileEx::Read(aachdr& h, int len, CMediaType* pmt)
bool CBaseSplitterFileEx::Read(ac3hdr& h, int len, CMediaType* pmt)
{
static int freq[] = {48000, 44100, 32000, 0};
+ bool e_ac3 = false;
memset(&h, 0, sizeof(h));
@@ -627,6 +628,7 @@ bool CBaseSplitterFileEx::Read(ac3hdr& h, int len, CMediaType* pmt)
h.sr_shift = max(h.bsid, 8) - 8;
} else {
/* Enhanced AC-3 */
+ e_ac3 = true;
Seek(pos);
h.frame_type = BitRead(2);
h.substreamid = BitRead(3);
@@ -679,7 +681,10 @@ bool CBaseSplitterFileEx::Read(ac3hdr& h, int len, CMediaType* pmt)
wfe.nBlockAlign = (WORD)(1536 * wfe.nAvgBytesPerSec / wfe.nSamplesPerSec);
pmt->majortype = MEDIATYPE_Audio;
- pmt->subtype = MEDIASUBTYPE_DOLBY_AC3;
+ if(e_ac3)
+ pmt->subtype = MEDIASUBTYPE_DOLBY_DDPLUS;
+ else
+ pmt->subtype = MEDIASUBTYPE_DOLBY_AC3;
pmt->formattype = FORMAT_WaveFormatEx;
pmt->SetFormat((BYTE*)&wfe, sizeof(wfe));
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.cpp b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
index 1dd79c85a..955e5ddb1 100644
--- a/src/filters/parser/MpegSplitter/MpegSplitter.cpp
+++ b/src/filters/parser/MpegSplitter/MpegSplitter.cpp
@@ -325,6 +325,10 @@ CString GetMediaTypeDesc(const CMediaType *_pMediaType, const CHdmvClipInfo::Str
UNUSED_ALWAYS(pInfoHDMV);
Infos.AddTail(L"HDMV LPCM");
}
+ if (_pMediaType->subtype == MEDIASUBTYPE_DOLBY_DDPLUS)
+ {
+ Infos.AddTail(L"Dolby Digital Plus");
+ }
else
{
switch (pInfo->wFormatTag)