Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
406a0154
Commit
406a0154
authored
Mar 08, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
screen_win32: fix potential memleak and use DeleteDC instead of ReleaseDC.
parent
188a6a71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
modules/access/screen/win32.c
modules/access/screen/win32.c
+4
-1
No files found.
modules/access/screen/win32.c
View file @
406a0154
...
@@ -64,6 +64,7 @@ int screen_InitCapture( demux_t *p_demux )
...
@@ -64,6 +64,7 @@ int screen_InitCapture( demux_t *p_demux )
if
(
!
p_data
->
hdc_src
)
if
(
!
p_data
->
hdc_src
)
{
{
msg_Err
(
p_demux
,
"cannot get device context"
);
msg_Err
(
p_demux
,
"cannot get device context"
);
free
(
p_data
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -71,6 +72,7 @@ int screen_InitCapture( demux_t *p_demux )
...
@@ -71,6 +72,7 @@ int screen_InitCapture( demux_t *p_demux )
if
(
!
p_data
->
hdc_dst
)
if
(
!
p_data
->
hdc_dst
)
{
{
msg_Err
(
p_demux
,
"cannot get compat device context"
);
msg_Err
(
p_demux
,
"cannot get compat device context"
);
free
(
p_data
);
ReleaseDC
(
0
,
p_data
->
hdc_src
);
ReleaseDC
(
0
,
p_data
->
hdc_src
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -90,8 +92,9 @@ int screen_InitCapture( demux_t *p_demux )
...
@@ -90,8 +92,9 @@ int screen_InitCapture( demux_t *p_demux )
default:
default:
msg_Err
(
p_demux
,
"unknown screen depth %i"
,
msg_Err
(
p_demux
,
"unknown screen depth %i"
,
p_sys
->
fmt
.
video
.
i_bits_per_pixel
);
p_sys
->
fmt
.
video
.
i_bits_per_pixel
);
DeleteDC
(
p_data
->
hdc_dst
);
ReleaseDC
(
0
,
p_data
->
hdc_src
);
ReleaseDC
(
0
,
p_data
->
hdc_src
);
ReleaseDC
(
0
,
p_data
->
hdc_dst
);
free
(
p_data
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
...
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