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
3fbb103a
Commit
3fbb103a
authored
Jan 27, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coregraphicslayer: fix memleak and avoid unnecessary image copy
parent
607c5b7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
modules/video_output/coregraphicslayer.m
modules/video_output/coregraphicslayer.m
+13
-2
No files found.
modules/video_output/coregraphicslayer.m
View file @
3fbb103a
...
...
@@ -255,6 +255,7 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
kCGRenderingIntentPerceptual
);
CGDataProviderRelease
(
dataProvider
);
CFRelease
(
dataRef
);
if
(
!
newFrame
)
goto
end
;
...
...
@@ -289,6 +290,14 @@ static int Control(vout_display_t *vd, int query, va_list args)
return
self
;
}
-
(
void
)
dealloc
{
if
(
_lastFrame
)
CGImageRelease
(
_lastFrame
);
[
super
dealloc
];
}
-
(
bool
)
locked
{
return
lock
;
...
...
@@ -302,8 +311,10 @@ static int Control(vout_display_t *vd, int query, va_list args)
return
;
}
_lastFrame
=
CGImageCreateCopy
(
lastFrame
);
CGImageRelease
(
lastFrame
);
if
(
_lastFrame
)
CGImageRelease
(
_lastFrame
);
_lastFrame
=
lastFrame
;
CGRect
invalidRect
=
CGRectMake
(
0
,
0
,
CGImageGetWidth
(
_lastFrame
),
CGImageGetHeight
(
_lastFrame
));
[
CATransaction
begin
];
[
self
setNeedsDisplayInRect
:
invalidRect
];
...
...
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