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
6a6c23bf
Commit
6a6c23bf
authored
Nov 01, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: fix picture lock/unlock with private pool
parent
37be0f0e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
include/vlc_picture_pool.h
include/vlc_picture_pool.h
+1
-0
src/misc/picture_pool.c
src/misc/picture_pool.c
+7
-2
src/video_output/vout_wrapper.c
src/video_output/vout_wrapper.c
+2
-2
No files found.
include/vlc_picture_pool.h
View file @
6a6c23bf
...
...
@@ -133,6 +133,7 @@ VLC_USED;
*/
VLC_API
unsigned
picture_pool_GetSize
(
const
picture_pool_t
*
);
bool
picture_pool_NeedsLocking
(
const
picture_pool_t
*
);
#endif
/* VLC_PICTURE_POOL_H */
src/misc/picture_pool.c
View file @
6a6c23bf
...
...
@@ -208,6 +208,8 @@ error:
picture_pool_t
*
picture_pool_Reserve
(
picture_pool_t
*
master
,
unsigned
count
)
{
assert
(
master
->
pic_unlock
==
NULL
);
picture_t
*
picture
[
count
?
count
:
1
];
unsigned
i
;
...
...
@@ -221,8 +223,6 @@ picture_pool_t *picture_pool_Reserve(picture_pool_t *master, unsigned count)
if
(
!
pool
)
goto
error
;
pool
->
pic_lock
=
master
->
pic_lock
;
pool
->
pic_unlock
=
master
->
pic_unlock
;
return
pool
;
error:
...
...
@@ -330,3 +330,8 @@ unsigned picture_pool_GetSize(const picture_pool_t *pool)
{
return
pool
->
picture_count
;
}
bool
picture_pool_NeedsLocking
(
const
picture_pool_t
*
pool
)
{
return
pool
->
pic_lock
!=
NULL
||
pool
->
pic_unlock
!=
NULL
;
}
src/video_output/vout_wrapper.c
View file @
6a6c23bf
...
...
@@ -133,8 +133,8 @@ int vout_InitWrapper(vout_thread_t *vout)
picture_pool_t
*
display_pool
=
vout_display_Pool
(
vd
,
allow_dr
?
__MAX
(
VOUT_MAX_PICTURES
,
reserved_picture
+
decoder_picture
)
:
3
);
if
(
allow_dr
&&
picture_pool_GetSize
(
display_pool
)
>=
reserved_picture
+
decoder_picture
)
{
if
(
allow_dr
&&
!
picture_pool_NeedsLocking
(
display_pool
)
&&
picture_pool_GetSize
(
display_pool
)
>=
reserved_picture
+
decoder_picture
)
{
sys
->
dpb_size
=
picture_pool_GetSize
(
display_pool
)
-
reserved_picture
;
sys
->
decoder_pool
=
display_pool
;
sys
->
display_pool
=
display_pool
;
...
...
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