diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2012-04-01 05:51:45 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2012-04-01 05:51:45 +0400 |
commit | 693d0bddc63cf252026cc71fcce7d76b1da24f9c (patch) | |
tree | 375f4a7ffd4b229af7898c1638c1f4bf72f7828f /src/filters/parser/MP4Splitter/MP4Splitter.cpp | |
parent | f79d298756e232fa8c5dcca9077b9df094940dd0 (diff) |
Change : MP4Splitter - ALAC, rewrite extradata parser;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4231 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/MP4Splitter.cpp')
-rw-r--r-- | src/filters/parser/MP4Splitter/MP4Splitter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/filters/parser/MP4Splitter/MP4Splitter.cpp b/src/filters/parser/MP4Splitter/MP4Splitter.cpp index 345a084ae..c11a15c99 100644 --- a/src/filters/parser/MP4Splitter/MP4Splitter.cpp +++ b/src/filters/parser/MP4Splitter/MP4Splitter.cpp @@ -1034,15 +1034,15 @@ HRESULT CMP4SplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) if(type == AP4_ATOM_TYPE_ALAC) {
const AP4_Byte* data = db.GetData();
AP4_Size size = db.GetDataSize();
- AP4_Size pos = 0;
- while (size > 36) {
- if((*(BYTE*)(data++) == 0x24) && (*(DWORD*)(data) == 0x63616c61)) {
- data -= 4;
+
+ while (size >= 36) {
+ if((*(DWORD*)(data) == 0x24000000) && (*(DWORD*)(data+4) == 0x63616c61)) {
break;
}
size--;
- pos++;
+ data++;
}
+
if(size >= 36) {
wfe->cbSize = 36;
memcpy(wfe+1, data, 36);
|