Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
40f657d5
Commit
40f657d5
authored
Aug 29, 2012
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atmo: fix memory leaks.
parent
a1dbddfa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
modules/video_filter/atmo/AtmoTools.cpp
modules/video_filter/atmo/AtmoTools.cpp
+1
-0
modules/video_filter/atmo/AtmoZoneDefinition.cpp
modules/video_filter/atmo/AtmoZoneDefinition.cpp
+3
-0
No files found.
modules/video_filter/atmo/AtmoTools.cpp
View file @
40f657d5
...
...
@@ -541,6 +541,7 @@ void CAtmoTools::SaveBitmap(HDC hdc,HBITMAP hBmp,char *fileName) {
fwrite
(
&
bmpInfo
.
bmiHeader
,
sizeof
(
BITMAPINFOHEADER
),
1
,
fp
);
fwrite
(
pBuf
,
bmpInfo
.
bmiHeader
.
biSizeImage
,
1
,
fp
);
fclose
(
fp
);
free
(
pBuf
);
}
...
...
modules/video_filter/atmo/AtmoZoneDefinition.cpp
View file @
40f657d5
...
...
@@ -134,6 +134,7 @@ void CAtmoZoneDefinition::SaveZoneBitmap(char *fileName)
fwrite
(
&
bmpInfo
.
bmiHeader
,
sizeof
(
BITMAPINFOHEADER
),
1
,
fp
);
fwrite
(
pBuf
,
bmpInfo
.
bmiHeader
.
biSizeImage
,
1
,
fp
);
fclose
(
fp
);
free
(
pBuf
);
}
void
CAtmoZoneDefinition
::
SaveWeightBitmap
(
char
*
fileName
,
int
*
weight
)
...
...
@@ -179,6 +180,7 @@ void CAtmoZoneDefinition::SaveWeightBitmap(char *fileName,int *weight)
fwrite
(
&
bmpInfo
.
bmiHeader
,
sizeof
(
BITMAPINFOHEADER
),
1
,
fp
);
fwrite
(
pBuf
,
bmpInfo
.
bmiHeader
.
biSizeImage
,
1
,
fp
);
fclose
(
fp
);
free
(
pBuf
);
}
...
...
@@ -252,6 +254,7 @@ int CAtmoZoneDefinition::LoadGradientFromBitmap(char *pszBitmap)
unsigned
char
*
pixelBuffer
=
(
unsigned
char
*
)
malloc
(
imageSize
);
if
(
fread
(
pixelBuffer
,
imageSize
,
1
,
bmp
)
!=
1
)
{
free
(
pixelBuffer
);
fclose
(
bmp
);
return
ATMO_LOAD_GRADIENT_FAILED_SIZE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment