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
657c1530
Commit
657c1530
authored
Oct 29, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: print error if the decoder leaked pictures
parent
89006bba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
include/vlc_picture_pool.h
include/vlc_picture_pool.h
+3
-1
src/misc/picture_pool.c
src/misc/picture_pool.c
+5
-2
src/video_output/video_output.c
src/video_output/video_output.c
+6
-2
No files found.
include/vlc_picture_pool.h
View file @
657c1530
...
...
@@ -101,8 +101,10 @@ VLC_API picture_t * picture_pool_Get( picture_pool_t * ) VLC_USED;
* @warning This can only be called when it is known that all pending
* references to the picture pool are stale, e.g. a decoder failed to
* release pictures properly when it terminated.
/
* @return the number of picture references that were freed
*/
voi
d
picture_pool_Reset
(
picture_pool_t
*
);
unsigne
d
picture_pool_Reset
(
picture_pool_t
*
);
/**
* It forces the next picture_pool_Get to return a picture even if no
...
...
src/misc/picture_pool.c
View file @
657c1530
...
...
@@ -274,8 +274,9 @@ picture_t *picture_pool_Get(picture_pool_t *pool)
return
NULL
;
}
voi
d
picture_pool_Reset
(
picture_pool_t
*
pool
)
unsigne
d
picture_pool_Reset
(
picture_pool_t
*
pool
)
{
unsigned
ret
=
0
;
retry:
vlc_mutex_lock
(
&
pool
->
lock
);
assert
(
pool
->
refs
>
0
);
...
...
@@ -287,11 +288,13 @@ retry:
if
(
sys
->
in_use
)
{
vlc_mutex_unlock
(
&
pool
->
lock
);
picture_Release
(
picture
);
ret
++
;
goto
retry
;
}
}
vlc_mutex_unlock
(
&
pool
->
lock
);
return
ret
;
}
void
picture_pool_NonEmpty
(
picture_pool_t
*
pool
)
...
...
src/video_output/video_output.c
View file @
657c1530
...
...
@@ -1181,13 +1181,17 @@ static void ThreadReset(vout_thread_t *vout)
{
ThreadFlush
(
vout
,
true
,
INT64_MAX
);
if
(
vout
->
p
->
decoder_pool
)
{
unsigned
count
;
unsigned
count
,
leaks
;
if
(
vout
->
p
->
private_pool
!=
NULL
)
{
count
=
picture_pool_GetSize
(
vout
->
p
->
private_pool
);
picture_pool_Delete
(
vout
->
p
->
private_pool
);
}
picture_pool_Reset
(
vout
->
p
->
decoder_pool
);
leaks
=
picture_pool_Reset
(
vout
->
p
->
decoder_pool
);
if
(
leaks
>
0
)
msg_Err
(
vout
,
"%u picture(s) leaked by decoder"
,
leaks
);
if
(
vout
->
p
->
private_pool
!=
NULL
)
{
vout
->
p
->
private_pool
=
picture_pool_Reserve
(
vout
->
p
->
decoder_pool
,
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