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
d006762c
Commit
d006762c
authored
Oct 29, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
picture_pool: remove evil no longer used picture_pool_NonEmpty()
parent
e56293ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
45 deletions
+0
-45
include/vlc_picture_pool.h
include/vlc_picture_pool.h
+0
-11
src/misc/picture_pool.c
src/misc/picture_pool.c
+0
-34
No files found.
include/vlc_picture_pool.h
View file @
d006762c
...
...
@@ -145,17 +145,6 @@ VLC_API void picture_pool_Enum( picture_pool_t *,
*/
unsigned
picture_pool_Reset
(
picture_pool_t
*
);
/**
* Forcefully marks one picture free if all pictures in the pool are allocated.
*
* @warning This is intrinsically race-prone. If the freed picture is still
* used, video will be corrupt, and the process will likely crash.
*
* @bug Do not use this function. It will never work properly.
* Fix the decoder bugs instead.
*/
void
picture_pool_NonEmpty
(
picture_pool_t
*
);
/**
* Reserves pictures from a pool and creates a new pool with those.
*
...
...
src/misc/picture_pool.c
View file @
d006762c
...
...
@@ -289,40 +289,6 @@ retry:
return
ret
;
}
void
picture_pool_NonEmpty
(
picture_pool_t
*
pool
)
{
picture_t
*
oldest
=
NULL
;
uint64_t
tick
=
0
;
vlc_mutex_lock
(
&
pool
->
lock
);
assert
(
pool
->
refs
>
0
);
for
(
unsigned
i
=
0
;
i
<
pool
->
picture_count
;
i
++
)
{
picture_t
*
picture
=
pool
->
picture
[
i
];
picture_gc_sys_t
*
sys
=
picture
->
gc
.
p_sys
;
if
(
!
sys
->
in_use
)
{
vlc_mutex_unlock
(
&
pool
->
lock
);
return
;
/* Nothing to do */
}
if
(
picture
->
gc
.
p_sys
->
tick
<
tick
)
{
oldest
=
picture
;
tick
=
picture
->
gc
.
p_sys
->
tick
;
}
}
if
(
oldest
!=
NULL
)
{
while
(
oldest
->
gc
.
p_sys
->
in_use
)
{
vlc_mutex_unlock
(
&
pool
->
lock
);
picture_Release
(
oldest
);
vlc_mutex_lock
(
&
pool
->
lock
);
}
}
vlc_mutex_unlock
(
&
pool
->
lock
);
}
unsigned
picture_pool_GetSize
(
const
picture_pool_t
*
pool
)
{
return
pool
->
picture_count
;
...
...
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