Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1d2dcf80
Commit
1d2dcf80
authored
Oct 27, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture_pool: remove unnecessary special case
We can offload the picture deletion to Destroy() in all cases.
parent
293ed5e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
src/misc/picture_pool.c
src/misc/picture_pool.c
+6
-10
No files found.
src/misc/picture_pool.c
View file @
1d2dcf80
...
...
@@ -209,16 +209,12 @@ void picture_pool_Delete(picture_pool_t *pool)
assert
(
!
pool
->
picture_reserved
[
i
]);
/* Restore the original garbage collector */
if
(
atomic_fetch_add
(
&
picture
->
gc
.
refcount
,
1
)
==
0
)
{
/* Simple case: the picture is not locked, destroy it now. */
picture
->
gc
.
pf_destroy
=
gc_sys
->
destroy
;
picture
->
gc
.
p_sys
=
gc_sys
->
destroy_sys
;
free
(
gc_sys
);
}
else
/* Intricate case: the picture is still locked and the gc
cannot be modified (w/o memory synchronization). */
atomic_store
(
&
gc_sys
->
zombie
,
true
);
/* Restore the initial reference that was cloberred in
* picture_pool_NewExtended(). */
atomic_fetch_add
(
&
picture
->
gc
.
refcount
,
1
);
/* The picture might still locked and then the G.C. state cannot be
* modified (w/o memory synchronization). */
atomic_store
(
&
gc_sys
->
zombie
,
true
);
picture_Release
(
picture
);
}
...
...
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