diff options
author | Underground78 <underground78@users.sourceforge.net> | 2013-02-03 14:29:31 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2013-02-03 14:32:23 +0400 |
commit | 767cd0634248f3b49cbb0dc2bde3fa176bdb6d40 (patch) | |
tree | a790d4e9d615f5c9058ab111aa3c24d7ef4beaa2 /src/filters/parser/BaseSplitter | |
parent | 42ee81efa75241a9b1327238ebfb0128d4251a7e (diff) |
Cosmetics: Define or use some constants when possible.
Diffstat (limited to 'src/filters/parser/BaseSplitter')
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp | 2 | ||||
-rw-r--r-- | src/filters/parser/BaseSplitter/BaseSplitterFileEx.h | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp index 7bfdf383a..889f3a163 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp @@ -1465,7 +1465,7 @@ bool CBaseSplitterFileEx::Read(pvahdr& h, bool fSync) BitByteAlign();
if (fSync) {
- for (int i = 0; i < 65536; i++) {
+ for (int i = 0; i < MAX_PROBE_SIZE; i++) {
if ((BitRead(64, true) & 0xfffffc00ffe00000i64) == 0x4156000055000000i64) {
break;
}
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h index 3e0c29a1a..a7f8e80de 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h +++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.h @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2012 see Authors.txt
+ * (C) 2006-2013 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -25,6 +25,7 @@ #include "../../../DSUtil/Mpeg2Def.h"
#define MAX_SPSPPS 256 // Max size for a SPS/PPS packet
+#define MAX_PROBE_SIZE (64 * 1024)
class CGolombBuffer;
@@ -61,7 +62,7 @@ public: // using CBaseSplitterFile::Read;
- bool NextMpegStartCode(BYTE& b, __int64 len = 65536);
+ bool NextMpegStartCode(BYTE& b, __int64 len = MAX_PROBE_SIZE);
#pragma pack(push, 1)
|