diff options
Diffstat (limited to 'src/filters/parser')
11 files changed, 22 insertions, 22 deletions
diff --git a/src/filters/parser/AviSplitter/AviReportWnd.cpp b/src/filters/parser/AviSplitter/AviReportWnd.cpp index 4007e33cf..77e994c2b 100644 --- a/src/filters/parser/AviSplitter/AviReportWnd.cpp +++ b/src/filters/parser/AviSplitter/AviReportWnd.cpp @@ -255,13 +255,13 @@ bool CAviPlotterWnd::Create(CAviFile* pAF, CRect r, CWnd* pParentWnd) if(nmax > 0 && tmax > 0) {
CAtlArray<CPen> pen;
pen.SetCount(pAF->m_avih.dwStreams);
- for(int i = 0; i < pen.GetCount(); i++) {
+ for(size_t i = 0; i < pen.GetCount(); i++) {
pen[i].CreatePen(PS_SOLID, 2, clr[i]);
}
CAtlArray<CPoint> pp;
pp.SetCount(pAF->m_avih.dwStreams);
- for(int i = 0; i < pen.GetCount(); i++) {
+ for(size_t i = 0; i < pen.GetCount(); i++) {
pp[i].SetPoint(-1, -1);
}
diff --git a/src/filters/parser/AviSplitter/AviReportWnd.h b/src/filters/parser/AviSplitter/AviReportWnd.h index 2f27b2d79..f610e2ad4 100644 --- a/src/filters/parser/AviSplitter/AviReportWnd.h +++ b/src/filters/parser/AviSplitter/AviReportWnd.h @@ -17,7 +17,7 @@ public: bool Create(CAviFile* pAF, CRect r, CWnd* pParentWnd);
int GetChunkDist(int x) {
- return x >= 0 && x < m_chunkdist.GetCount() ? m_chunkdist[x] : 0;
+ return (x >= 0 && (size_t)x < m_chunkdist.GetCount()) ? m_chunkdist[x] : 0;
}
DECLARE_MESSAGE_MAP()
diff --git a/src/filters/parser/AviSplitter/AviSplitter.cpp b/src/filters/parser/AviSplitter/AviSplitter.cpp index 2815422fe..1311a7f68 100644 --- a/src/filters/parser/AviSplitter/AviSplitter.cpp +++ b/src/filters/parser/AviSplitter/AviSplitter.cpp @@ -221,7 +221,7 @@ HRESULT CAviSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) if(s->cs.GetCount() && pvih->AvgTimePerFrame > 0) {
__int64 size = 0;
- for(int i = 0; i < s->cs.GetCount(); i++) {
+ for(size_t i = 0; i < s->cs.GetCount(); i++) {
size += s->cs[i].orgsize;
}
pvih->dwBitRate = size*8 / s->cs.GetCount() * 10000000i64 / pvih->AvgTimePerFrame;
@@ -811,7 +811,7 @@ STDMETHODIMP CAviSplitterFilter::GetKeyFrameCount(UINT& nKFs) continue;
}
- for(int j = 0; j < s->cs.GetCount(); j++) {
+ for(size_t j = 0; j < s->cs.GetCount(); j++) {
CAviFile::strm_t::chunk& c = s->cs[j];
if(c.fKeyFrame) {
nKFs++;
@@ -850,7 +850,7 @@ STDMETHODIMP CAviSplitterFilter::GetKeyFrames(const GUID* pFormat, REFERENCE_TIM bool fConvertToRefTime = !!(*pFormat == TIME_FORMAT_MEDIA_TIME);
- for(int j = 0; j < s->cs.GetCount() && nKFsTmp < nKFs; j++) {
+ for(size_t j = 0; j < s->cs.GetCount() && nKFsTmp < nKFs; j++) {
if(s->cs[j].fKeyFrame) {
pKFs[nKFsTmp++] = fConvertToRefTime ? s->GetRefTime(j, s->cs[j].size) : j;
}
diff --git a/src/filters/parser/BaseSplitter/BaseSplitter.cpp b/src/filters/parser/BaseSplitter/BaseSplitter.cpp index 1098429cd..57e154026 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitter.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitter.cpp @@ -279,7 +279,7 @@ HRESULT CBaseSplitterOutputPin::DecideBufferSize(IMemAllocator* pAlloc, ALLOCATO HRESULT CBaseSplitterOutputPin::CheckMediaType(const CMediaType* pmt)
{
- for(int i = 0; i < m_mts.GetCount(); i++) {
+ for(size_t i = 0; i < m_mts.GetCount(); i++) {
if(*pmt == m_mts[i]) {
return S_OK;
}
@@ -295,7 +295,7 @@ HRESULT CBaseSplitterOutputPin::GetMediaType(int iPosition, CMediaType* pmt) if(iPosition < 0) {
return E_INVALIDARG;
}
- if(iPosition >= m_mts.GetCount()) {
+ if((size_t)iPosition >= m_mts.GetCount()) {
return VFW_S_NO_MORE_ITEMS;
}
diff --git a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp index 8c380ebe4..3caea5a6c 100644 --- a/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp +++ b/src/filters/parser/BaseSplitter/BaseSplitterFileEx.cpp @@ -1416,7 +1416,7 @@ bool CBaseSplitterFileEx::Read(avchdr& h, int len, CMediaType* pmt) } else if(pos > nalstartpos) {
// Copy into buffer
Seek(nalstartpos);
- int bufsize = countof(h.spspps[index].buffer);
+ unsigned int bufsize = countof(h.spspps[index].buffer);
int len = min(bufsize - h.spspps[index].size, pos - nalstartpos);
ByteRead(h.spspps[index].buffer+h.spspps[index].size, len);
Seek(pos);
diff --git a/src/filters/parser/BaseSplitter/MultiFiles.cpp b/src/filters/parser/BaseSplitter/MultiFiles.cpp index 98b335d59..cd08aec72 100644 --- a/src/filters/parser/BaseSplitter/MultiFiles.cpp +++ b/src/filters/parser/BaseSplitter/MultiFiles.cpp @@ -93,7 +93,7 @@ ULONGLONG CMultiFiles::Seek(LONGLONG lOff, UINT nFrom) return llNewPos.QuadPart;
} else {
- LONGLONG lAbsolutePos = GetAbsolutePosition(lOff, nFrom);
+ ULONGLONG lAbsolutePos = GetAbsolutePosition(lOff, nFrom);
int nNewPart = 0;
ULONGLONG llSum = 0;
@@ -147,12 +147,12 @@ UINT CMultiFiles::Read(void* lpBuf, UINT nCount) break;
}
- if (dwRead != nCount && m_nCurPart < m_strFiles.GetCount()-1) {
+ if (dwRead != nCount && (m_nCurPart < 0 || (size_t)m_nCurPart < m_strFiles.GetCount()-1)) {
OpenPart (m_nCurPart+1);
lpBuf = (void*)((BYTE*)lpBuf + dwRead);
nCount -= dwRead;
}
- } while (nCount != dwRead && m_nCurPart < m_strFiles.GetCount()-1);
+ } while (nCount != dwRead && (m_nCurPart < 0 || (size_t)m_nCurPart < m_strFiles.GetCount()-1));
return dwRead;
}
diff --git a/src/filters/parser/DSMSplitter/DSMSplitter.cpp b/src/filters/parser/DSMSplitter/DSMSplitter.cpp index e2b37a7be..74c148d53 100644 --- a/src/filters/parser/DSMSplitter/DSMSplitter.cpp +++ b/src/filters/parser/DSMSplitter/DSMSplitter.cpp @@ -126,7 +126,7 @@ HRESULT CDSMSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) qsort(ids.GetData(), ids.GetCount(), sizeof(BYTE), compare_id);
- for(int i = 0; i < ids.GetCount(); i++) {
+ for(size_t i = 0; i < ids.GetCount(); i++) {
BYTE id = ids[i];
CMediaType& mt = m_pFile->m_mts[id];
@@ -177,7 +177,7 @@ HRESULT CDSMSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) SetProperty(CStringW(key), value);
}
- for(int i = 0; i < m_resources.GetCount(); i++) {
+ for(size_t i = 0; i < m_resources.GetCount(); i++) {
const CDSMResource& r = m_resources[i];
if(r.mime == "application/x-truetype-font") {
m_fontinst.InstallFont(r.data);
diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp index 11ec12404..4d9d97f27 100644 --- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp +++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp @@ -384,7 +384,7 @@ avcsuccess: }
if(AvgTimePerFrame) {
- for(int i = 0; i < mts.GetCount(); i++) {
+ for(size_t i = 0; i < mts.GetCount(); i++) {
if(mts[i].formattype == FORMAT_VideoInfo
|| mts[i].formattype == FORMAT_VideoInfo2
|| mts[i].formattype == FORMAT_MPEG2Video) {
@@ -394,7 +394,7 @@ avcsuccess: }
if(pTE->v.DisplayWidth != 0 && pTE->v.DisplayHeight != 0) {
- for(int i = 0; i < mts.GetCount(); i++) {
+ for(size_t i = 0; i < mts.GetCount(); i++) {
if(mts[i].formattype == FORMAT_VideoInfo) {
DWORD vih1 = FIELD_OFFSET(VIDEOINFOHEADER, bmiHeader);
DWORD vih2 = FIELD_OFFSET(VIDEOINFOHEADER2, bmiHeader);
@@ -485,7 +485,7 @@ avcsuccess: }
int totalsize = 0;
- for(int i = 0; i < sizes.GetCount(); i++) {
+ for(size_t i = 0; i < sizes.GetCount(); i++) {
totalsize += sizes[i];
}
@@ -501,7 +501,7 @@ avcsuccess: pvf2->SamplesPerSec = (DWORD)pTE->a.SamplingFrequency;
pvf2->BitsPerSample = (DWORD)pTE->a.BitDepth;
BYTE* p2 = mt.Format() + sizeof(VORBISFORMAT2);
- for(int i = 0; i < sizes.GetCount(); p += sizes[i], p2 += sizes[i], i++) {
+ for(size_t i = 0; i < sizes.GetCount(); p += sizes[i], p2 += sizes[i], i++) {
memcpy(p2, p, pvf2->HeaderSize[i] = sizes[i]);
}
@@ -650,7 +650,7 @@ avcsuccess: }
}
- for(int i = 0; i < pinOut.GetCount(); i++) {
+ for(size_t i = 0; i < pinOut.GetCount(); i++) {
CAutoPtr<CBaseSplitterOutputPin> pPinOut;
pPinOut.Attach(pinOut[i]);
diff --git a/src/filters/parser/MpegSplitter/MpegSplitter.cpp b/src/filters/parser/MpegSplitter/MpegSplitter.cpp index 0b8ec7062..a0c6b52eb 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitter.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitter.cpp @@ -762,7 +762,7 @@ HRESULT CMpegSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) // Create
if (m_ClipInfo.IsHdmv()) {
- for (int i=0; i<m_ClipInfo.GetStreamNumber(); i++) {
+ for (size_t i=0; i < m_ClipInfo.GetStreamNumber(); i++) {
CHdmvClipInfo::Stream* stream = m_ClipInfo.GetStreamByIndex (i);
if (stream->m_Type == PRESENTATION_GRAPHICS_STREAM) {
m_pFile->AddHdmvPGStream (stream->m_PID, stream->m_LanguageCode);
diff --git a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp index 270af3d9b..70a03fc50 100644 --- a/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp +++ b/src/filters/parser/MpegSplitter/MpegSplitterFile.cpp @@ -388,7 +388,7 @@ HRESULT CMpegSplitterFile::SearchStreams(__int64 start, __int64 stop, IAsyncRead // each time a new part is open...
// use this code only if Blu-ray is detected
if (m_ClipInfo.IsHdmv()) {
- for (int i=0; i<m_ClipInfo.GetStreamNumber(); i++) {
+ for (size_t i=0; i<m_ClipInfo.GetStreamNumber(); i++) {
CHdmvClipInfo::Stream* stream = m_ClipInfo.GetStreamByIndex(i);
if (stream->m_Type == VIDEO_STREAM_H264 && m_rtMin == 116506666) {
CComQIPtr<ISyncReader> pReader = pAsyncReader;
diff --git a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp index 2f29c3b21..5614f5f2f 100644 --- a/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp +++ b/src/filters/parser/RealMediaSplitter/RealMediaSplitter.cpp @@ -287,7 +287,7 @@ HRESULT CRealMediaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) fccstr[4] = 0;
BYTE* fmt = pmp->typeSpecData.GetData();
- for(int i = 0; i < pmp->typeSpecData.GetCount()-4; i++, fmt++) {
+ for(size_t i = 0; i < pmp->typeSpecData.GetCount()-4; i++, fmt++) {
if(fmt[0] == '.' || fmt[1] == 'r' || fmt[2] == 'a') {
break;
}
|