Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git "a/C:\\Users\\user\\AppData\\Local\\Temp\\TortoiseGit\\ximEFE2.tmp\\ximaenc-54f8e79-left.cpp" "b/E:\\XBMC-Source2\\xbmc\\lib\\cximage-6.0\\CxImage\\ximaenc.cpp"
- index 14e7890..6ab922d 100644
- --- "a/C:\\Users\\user\\AppData\\Local\\Temp\\TortoiseGit\\ximEFE2.tmp\\ximaenc-54f8e79-left.cpp"
- +++ "b/E:\\XBMC-Source2\\xbmc\\lib\\cximage-6.0\\CxImage\\ximaenc.cpp"
- @@ -803,7 +803,7 @@ bool CxImage::Decode(CxFile *hFile, DWORD imagetype)
- // libDCR performs a high volume of seeks/reads which XBMC's
- // VFS cannot sustain efficiently, therefore read the file into
- // memory and send it to the decoder.
- -
- +
- long buffer_size = hFile->Size();
- unsigned char* buffer = (unsigned char*)malloc( buffer_size );
- @@ -814,11 +814,16 @@ bool CxImage::Decode(CxFile *hFile, DWORD imagetype)
- CxMemFile hMemFile( buffer, buffer_size );
- if (newima.Decode( &hMemFile ))
- {
- + free (buffer);
- Transfer(newima);
- return true;
- }
- else
- - hFile->Seek(pos, SEEK_SET);
- + {
- + free (buffer);
- + strcpy(info.szLastError,newima.GetLastError());
- + return false;
- + }
- }
- else
- {
- @@ -828,8 +833,10 @@ bool CxImage::Decode(CxFile *hFile, DWORD imagetype)
- Transfer(newima);
- return true;
- }
- - else
- - hFile->Seek(pos,SEEK_SET);
- + else
- + {
- + hFile->Seek(pos,SEEK_SET);
- + }
- }
- }
- #endif
- @@ -1051,7 +1058,7 @@ bool CxImage::Decode(CxFile *hFile, DWORD imagetype)
- // libDCR performs a high volume of seeks/reads which XBMC's
- // VFS cannot sustain efficiently, therefore read the file into
- // memory and send it to the decoder.
- -
- +
- long buffer_size = hFile->Size();
- unsigned char* buffer = (unsigned char*)malloc( buffer_size );
- @@ -1062,11 +1069,13 @@ bool CxImage::Decode(CxFile *hFile, DWORD imagetype)
- CxMemFile hMemFile( buffer, buffer_size );
- if (newima.Decode( &hMemFile ))
- {
- + free (buffer);
- Transfer(newima);
- return true;
- }
- else
- {
- + free (buffer);
- strcpy(info.szLastError,newima.GetLastError());
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement