diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2011-05-27 00:22:57 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2011-05-27 00:22:57 +0400 |
commit | 25f12da86f2ce62308d6e60e0717fab5da9909e4 (patch) | |
tree | 31c41d446efa2117f6207da50dca2ed96dad08ba /src/filters/parser/MpegSplitter | |
parent | 19c0aa4a24c1d3b780ef973730bbae6032f32e17 (diff) |
Fix : MPEGSplitter, some AAC(with ADTS header) detected as MPEG Audio. ticket #1356;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3152 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MpegSplitter')
-rw-r--r-- | src/filters/parser/MpegSplitter/MpegSplitterFile.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp index 8898ce61e..cedccbd18 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp @@ -452,9 +452,8 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) }
}
- Seek(pos);
-
if(type == unknown) {
+ Seek(pos);
// PPS and SPS can be present on differents packets
// and can also be split into multiple packets
if (!avch.Lookup(pid))
@@ -470,18 +469,18 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) } else if(pesid >= 0xc0 && pesid < 0xe0) { // mpeg audio
__int64 pos = GetPos();
+
if(type == unknown) {
- CMpegSplitterFile::mpahdr h;
- if(!m_streams[audio].Find(s) && Read(h, len, false, &s.mt)) {
+ CMpegSplitterFile::aachdr h;
+ if(!m_streams[audio].Find(s) && Read(h, len, &s.mt)) {
type = audio;
}
}
- Seek(pos);
-
if(type == unknown) {
- CMpegSplitterFile::aachdr h;
- if(!m_streams[audio].Find(s) && Read(h, len, &s.mt)) {
+ Seek(pos);
+ CMpegSplitterFile::mpahdr h;
+ if(!m_streams[audio].Find(s) && Read(h, len, false, &s.mt)) {
type = audio;
}
}
@@ -499,8 +498,8 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) }
// DTS
- Seek(pos);
if(type == unknown) {
+ Seek(pos);
CMpegSplitterFile::dtshdr h;
if(Read(h, len, &s.mt)) {
type = audio;
@@ -508,8 +507,8 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) }
// VC1
- Seek(pos);
if(type == unknown) {
+ Seek(pos);
CMpegSplitterFile::vc1hdr h;
if(!m_streams[video].Find(s) && Read(h, len, &s.mt, m_nVC1_GuidFlag)) {
type = video;
@@ -517,8 +516,8 @@ DWORD CMpegSplitterFile::AddStream(WORD pid, BYTE pesid, DWORD len) }
// DVB subtitles
- Seek(pos);
if(type == unknown) {
+ Seek(pos);
CMpegSplitterFile::dvbsub h;
if(!m_streams[video].Find(s) && Read(h, len, &s.mt)) {
type = subpic;
|