diff options
author | Aleksoid <aleksoid@users.sourceforge.net> | 2012-03-02 11:22:07 +0400 |
---|---|---|
committer | Aleksoid <aleksoid@users.sourceforge.net> | 2012-03-02 11:22:07 +0400 |
commit | 639dfd5710a4ff21672b83ba23c87b4f5559f59c (patch) | |
tree | 6721a86e6d400bc45bdb7e51477e167131ab8208 /src/Subtitles | |
parent | 1441ad44afd50ab84896d5606204facd61e535cf (diff) |
Change : update libav, thanks to Alexins;
Fix : crash on x64 and YV12 output;
Change : remove some C4018 warning;
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4114 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/Subtitles')
-rw-r--r-- | src/Subtitles/TextFile.cpp | 2 | ||||
-rw-r--r-- | src/Subtitles/VobSubImage.cpp | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/Subtitles/TextFile.cpp b/src/Subtitles/TextFile.cpp index 629b2791c..cf8fdb4d4 100644 --- a/src/Subtitles/TextFile.cpp +++ b/src/Subtitles/TextFile.cpp @@ -150,7 +150,7 @@ ULONGLONG CTextFile::Seek(LONGLONG lOff, UINT nFrom) break;
}
- lOff = max(min(lOff, len), 0) + m_offset;
+ lOff = max(min((ULONGLONG)lOff, len), 0) + m_offset;
pos = CStdioFile::Seek(lOff, begin) - m_offset;
diff --git a/src/Subtitles/VobSubImage.cpp b/src/Subtitles/VobSubImage.cpp index 0d979b2dd..1f3b9aa4b 100644 --- a/src/Subtitles/VobSubImage.cpp +++ b/src/Subtitles/VobSubImage.cpp @@ -538,25 +538,25 @@ CAutoPtrList<COutline>* CVobSubImage::GetOutlineList(CPoint& topleft) static bool FitLine(COutline& o, int& start, int& end)
{
- int len = int(o.pa.GetCount());
+ size_t len = o.pa.GetCount();
if (len < 7) {
return false; // small segments should be handled with beziers...
}
- for (start = 0; start < len && !o.da[start]; start++) {
+ for (start = 0; start < (int)len && !o.da[start]; start++) {
;
}
for (end = len-1; end > start && !o.da[end]; end--) {
;
}
- if (end-start < 8 || end-start < (len-end)+(start-0)) {
+ if (end-start < 8 || end-start < ((int)len-end)+(start-0)) {
return false;
}
CUIntArray la, ra;
- int i, j, k;
+ size_t i, j, k;
for (i = start+1, j = end, k = start; i <= j; i++) {
if (!o.da[i]) {
@@ -940,14 +940,14 @@ int CVobSubImage::GrabSegment(int start, COutline& o, COutline& ret) void CVobSubImage::SplitOutline(COutline& o, COutline& o1, COutline& o2)
{
- int len = int(o.pa.GetCount());
+ size_t len = int(o.pa.GetCount());
if (len < 4) {
return;
}
CAtlArray<UINT> la, sa, ea;
- int i, j, k;
+ size_t i, j, k;
for (i = 0, j = 0; j < len; j++) {
if (j == len-1 || o.da[j]) {
@@ -958,8 +958,8 @@ void CVobSubImage::SplitOutline(COutline& o, COutline& o1, COutline& o2) }
}
- int maxlen = 0, maxidx = -1;
- int maxlen2 = 0, maxidx2 = -1;
+ size_t maxlen = 0, maxidx = -1;
+ size_t maxlen2 = 0, maxidx2 = -1;
for (i = 0; i < la.GetCount(); i++) {
if (maxlen < la[i]) {
|