diff options
author | Alex Marsev <alex.marsev@gmail.com> | 2013-11-19 20:40:34 +0400 |
---|---|---|
committer | Alex Marsev <alex.marsev@gmail.com> | 2013-11-20 02:13:52 +0400 |
commit | 7cfb79e9b11121631c215c992d3fe75254eb9768 (patch) | |
tree | 52918760af3a914efff0790ca6a01b6c62879c24 /src/filters/parser/BaseSplitter | |
parent | 2a1da9ca800ccab6af323cb3d29e6606f887c3fd (diff) |
AsyncReader: fix unsigned compared against 0
CID 966060
Diffstat (limited to 'src/filters/parser/BaseSplitter')
-rw-r--r-- | src/filters/parser/BaseSplitter/AsyncReader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/filters/parser/BaseSplitter/AsyncReader.cpp b/src/filters/parser/BaseSplitter/AsyncReader.cpp index 3d4ae990c..e98f77e65 100644 --- a/src/filters/parser/BaseSplitter/AsyncReader.cpp +++ b/src/filters/parser/BaseSplitter/AsyncReader.cpp @@ -32,7 +32,7 @@ CAsyncFileReader::CAsyncFileReader(CString fn, HRESULT& hr)
: CUnknown(NAME("CAsyncFileReader"), nullptr, &hr)
- , m_len((ULONGLONG) - 1)
+ , m_len(ULONGLONG_MAX)
, m_hBreakEvent(nullptr)
, m_lOsError(0)
{
@@ -44,7 +44,7 @@ CAsyncFileReader::CAsyncFileReader(CString fn, HRESULT& hr) CAsyncFileReader::CAsyncFileReader(CAtlList<CHdmvClipInfo::PlaylistItem>& Items, HRESULT& hr)
: CUnknown(NAME("CAsyncFileReader"), nullptr, &hr)
- , m_len((ULONGLONG) - 1)
+ , m_len(ULONGLONG_MAX)
, m_hBreakEvent(nullptr)
, m_lOsError(0)
{
@@ -115,7 +115,7 @@ STDMETHODIMP CAsyncFileReader::SyncRead(LONGLONG llPosition, LONG lLength, BYTE* STDMETHODIMP CAsyncFileReader::Length(LONGLONG* pTotal, LONGLONG* pAvailable)
{
- LONGLONG len = m_len >= 0 ? m_len : GetLength();
+ LONGLONG len = (m_len != ULONGLONG_MAX) ? m_len : GetLength();
if (pTotal) {
*pTotal = len;
}
@@ -155,7 +155,7 @@ CAsyncUrlReader::CAsyncUrlReader(CString url, HRESULT& hr) }
hr = Open(m_fn, modeRead | shareDenyRead | typeBinary | osSequentialScan) ? S_OK : E_FAIL;
- m_len = (ULONGLONG) - 1; // force GetLength() return actual length always
+ m_len = ULONGLONG_MAX; // force GetLength() return actual length always
}
CAsyncUrlReader::~CAsyncUrlReader()
|