aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asap/win32/build_xbmc_win32.sh5
-rw-r--r--lib/cpluff/libcpluff/win32/dirent.c2
-rw-r--r--lib/cximage-6.0/CxImage/ximadsp.cpp28
-rw-r--r--lib/cximage-6.0/CxImage/ximatif.cpp2
-rw-r--r--lib/ffmpeg/build_xbmc_win32.sh5
-rw-r--r--lib/libdvd/build-xbmc-win32.sh3
-rw-r--r--lib/libmpeg2/make-xbmc-lib-win32.sh4
7 files changed, 45 insertions, 4 deletions
diff --git a/lib/asap/win32/build_xbmc_win32.sh b/lib/asap/win32/build_xbmc_win32.sh
index 7f3514a562..47d9f01141 100644
--- a/lib/asap/win32/build_xbmc_win32.sh
+++ b/lib/asap/win32/build_xbmc_win32.sh
@@ -1,6 +1,7 @@
#!/bin/bash
MAKEFLAGS=""
+BGPROCESSFILE="$2"
if [ "$1" == "clean" ]
then
@@ -12,4 +13,6 @@ fi
make $MAKEFLAGS xbmc
-cp xbmc_asap.dll /xbmc/system/players/paplayer/ \ No newline at end of file
+cp xbmc_asap.dll /xbmc/system/players/paplayer/
+#remove the bgprocessfile for signaling the process end
+rm $BGPROCESSFILE \ No newline at end of file
diff --git a/lib/cpluff/libcpluff/win32/dirent.c b/lib/cpluff/libcpluff/win32/dirent.c
index db72f39d37..3254b22729 100644
--- a/lib/cpluff/libcpluff/win32/dirent.c
+++ b/lib/cpluff/libcpluff/win32/dirent.c
@@ -199,6 +199,8 @@ int scandir(
++entries;
}
+ closedir(d);
+
// sort
if (*namelist && compar) qsort(*namelist, entries, sizeof((*namelist)[0]), compar);
diff --git a/lib/cximage-6.0/CxImage/ximadsp.cpp b/lib/cximage-6.0/CxImage/ximadsp.cpp
index feff6ab867..f54ffd615a 100644
--- a/lib/cximage-6.0/CxImage/ximadsp.cpp
+++ b/lib/cximage-6.0/CxImage/ximadsp.cpp
@@ -1374,6 +1374,7 @@ bool CxImage::Median(long Ksize)
CxImage tmp(*this);
if (!tmp.IsValid()){
+ free(kernel);
strcpy(info.szLastError,tmp.GetLastError());
return false;
}
@@ -2424,11 +2425,15 @@ bool CxImage::TextBlur(BYTE threshold, BYTE decay, BYTE max_depth, bool bBlurHor
pPalette = new RGBQUAD[head.biClrUsed];
memcpy(pPalette, GetPalette(),GetPaletteSize());
if (!IncreaseBpp(24))
+ {
+ delete [] pPalette;
return false;
+ }
}
CxImage tmp(*this);
if (!tmp.IsValid()){
+ delete [] pPalette;
strcpy(info.szLastError,tmp.GetLastError());
return false;
}
@@ -2484,12 +2489,16 @@ bool CxImage::GaussianBlur(float radius /*= 1.0f*/, CxImage* iDst /*= 0*/)
pPalette = new RGBQUAD[head.biClrUsed];
memcpy(pPalette, GetPalette(),GetPaletteSize());
if (!IncreaseBpp(24))
+ {
+ delete [] pPalette;
return false;
+ }
}
CxImage tmp_x(*this, false, true, true);
if (!tmp_x.IsValid()){
strcpy(info.szLastError,tmp_x.GetLastError());
+ delete [] pPalette;
return false;
}
@@ -2508,7 +2517,7 @@ bool CxImage::GaussianBlur(float radius /*= 1.0f*/, CxImage* iDst /*= 0*/)
double dbScaler = 50.0f/head.biHeight;
// blur the rows
- for (y=0;y<head.biHeight;y++)
+ for (y=0;y<head.biHeight;y++)
{
if (info.nEscape) break;
info.nProgress = (long)(y*dbScaler);
@@ -2518,6 +2527,7 @@ bool CxImage::GaussianBlur(float radius /*= 1.0f*/, CxImage* iDst /*= 0*/)
CxImage tmp_y(tmp_x, false, true, true);
if (!tmp_y.IsValid()){
+ delete [] pPalette;
strcpy(info.szLastError,tmp_y.GetLastError());
return false;
}
@@ -2525,8 +2535,8 @@ bool CxImage::GaussianBlur(float radius /*= 1.0f*/, CxImage* iDst /*= 0*/)
CImageIterator itDst(&tmp_y);
// blur the cols
- BYTE* cur_col = (BYTE*)malloc(bypp*head.biHeight);
- BYTE* dest_col = (BYTE*)malloc(bypp*head.biHeight);
+ BYTE* cur_col = (BYTE*)malloc(bypp*head.biHeight);
+ BYTE* dest_col = (BYTE*)malloc(bypp*head.biHeight);
dbScaler = 50.0f/head.biWidth;
@@ -2594,11 +2604,15 @@ bool CxImage::SelectiveBlur(float radius, BYTE threshold, CxImage* iDst)
pPalette = new RGBQUAD[head.biClrUsed];
memcpy(pPalette, GetPalette(),GetPaletteSize());
if (!Tmp.IncreaseBpp(24))
+ {
+ delete [] pPalette;
return false;
+ }
}
CxImage Dst(Tmp, true, true, true);
if (!Dst.IsValid()){
+ delete [] pPalette;
strcpy(info.szLastError,Dst.GetLastError());
return false;
}
@@ -2608,6 +2622,7 @@ bool CxImage::SelectiveBlur(float radius, BYTE threshold, CxImage* iDst)
BYTE thresh_up = (BYTE)min(255,(int)(128 + threshold));
long kernel[]={-100,-100,-100,-100,801,-100,-100,-100,-100};
if (!Tmp.Filter(kernel,3,800,128)){
+ delete [] pPalette;
strcpy(info.szLastError,Tmp.GetLastError());
return false;
}
@@ -2644,6 +2659,7 @@ bool CxImage::SelectiveBlur(float radius, BYTE threshold, CxImage* iDst)
//blur the image (only in the selected pixels)
Dst.SelectionCopy(Tmp);
if (!Dst.GaussianBlur(radius)){
+ delete [] pPalette;
strcpy(info.szLastError,Dst.GetLastError());
return false;
}
@@ -3493,12 +3509,18 @@ bool CxImage::FloodFill(const long xStart, const long yStart, const RGBQUAD cFil
pPalette = new RGBQUAD[head.biClrUsed];
memcpy(pPalette, GetPalette(),GetPaletteSize());
if (!IncreaseBpp(24))
+ {
+ delete [] pPalette;
return false;
+ }
}
BYTE* pFillMask = (BYTE*)calloc(head.biWidth * head.biHeight,1);
if (!pFillMask)
+ {
+ delete [] pPalette;
return false;
+ }
//------------------------------------- Begin of Flood Fill
POINT offset[4] = {{-1,0},{0,-1},{1,0},{0,1}};
diff --git a/lib/cximage-6.0/CxImage/ximatif.cpp b/lib/cximage-6.0/CxImage/ximatif.cpp
index 0018fa98f2..658392a824 100644
--- a/lib/cximage-6.0/CxImage/ximatif.cpp
+++ b/lib/cximage-6.0/CxImage/ximatif.cpp
@@ -316,6 +316,7 @@ bool CxImageTIF::Decode(CxFile * hFile)
if (info.nEscape){ // <vho> - cancel decoding
free(bits);
+ free(row_shifts);
cx_throw("Cancelled");
}
@@ -332,6 +333,7 @@ bool CxImageTIF::Decode(CxFile * hFile)
if (TIFFReadTile(m_tif, tilebuf, col, ys, 0, 0) < 0){
free(tilebuf);
free(bits);
+ free(row_shifts);
cx_throw("Corrupted tiled TIFF file!");
}
diff --git a/lib/ffmpeg/build_xbmc_win32.sh b/lib/ffmpeg/build_xbmc_win32.sh
index cc5682f9d9..62b16fbfab 100644
--- a/lib/ffmpeg/build_xbmc_win32.sh
+++ b/lib/ffmpeg/build_xbmc_win32.sh
@@ -1,6 +1,7 @@
#!/bin/bash
MAKEFLAGS=""
+BGPROCESSFILE="$2"
if [ "$1" == "clean" ]
then
@@ -59,3 +60,7 @@ cp .libs/avfilter-2.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/postproc-52.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/swresample-0.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/swscale-2.dll /xbmc/system/players/dvdplayer/
+
+#remove the bgprocessfile for signaling the process end
+echo deleting $BGPROCESSFILE
+rm $BGPROCESSFILE
diff --git a/lib/libdvd/build-xbmc-win32.sh b/lib/libdvd/build-xbmc-win32.sh
index e32b81f2fa..f68a975b01 100644
--- a/lib/libdvd/build-xbmc-win32.sh
+++ b/lib/libdvd/build-xbmc-win32.sh
@@ -2,6 +2,7 @@
MAKECLEAN=0
MAKEFLAGS=""
+BGPROCESSFILE=$2
if [ "$1" = "clean" ]
then
@@ -78,3 +79,5 @@ strip -S obj/libdvdnav.dll
cd ..
cp libdvdnav/obj/libdvdnav.dll /xbmc/system/players/dvdplayer/
echo "***** Done *****"
+#remove the bgprocessfile for signaling the process end
+rm $BGPROCESSFILE
diff --git a/lib/libmpeg2/make-xbmc-lib-win32.sh b/lib/libmpeg2/make-xbmc-lib-win32.sh
index ce54d062b8..10f85f7111 100644
--- a/lib/libmpeg2/make-xbmc-lib-win32.sh
+++ b/lib/libmpeg2/make-xbmc-lib-win32.sh
@@ -1,6 +1,7 @@
#!/bin/bash
MAKEFLAGS=""
+BGPROCESSFILE="$2"
if [ "$1" == "clean" ]
then
@@ -27,3 +28,6 @@ make $MAKEFLAGS &&
strip libmpeg2/.libs/*.dll &&
cp libmpeg2/.libs/*.dll /xbmc/system/players/dvdplayer/
+
+#remove the bgprocessfile for signaling the process end
+rm $BGPROCESSFILE \ No newline at end of file