Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0e2f21c8
Commit
0e2f21c8
authored
Oct 14, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorized forced vout picture releases.
parent
acf420db
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
15 deletions
+8
-15
src/input/decoder.c
src/input/decoder.c
+2
-10
src/video_output/video_output.c
src/video_output/video_output.c
+5
-4
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+1
-1
No files found.
src/input/decoder.c
View file @
0e2f21c8
...
...
@@ -1818,15 +1818,7 @@ static void DeleteDecoder( decoder_t * p_dec )
if
(
p_owner
->
p_vout
)
{
/* Hack to make sure all the the pictures are freed by the decoder */
for
(
int
i_pic
=
0
;
i_pic
<
p_owner
->
p_vout
->
render
.
i_pictures
;
i_pic
++
)
{
picture_t
*
p_pic
=
p_owner
->
p_vout
->
render
.
pp_picture
[
i_pic
];
if
(
p_pic
->
i_status
==
RESERVED_PICTURE
)
vout_DestroyPicture
(
p_owner
->
p_vout
,
p_pic
);
if
(
p_pic
->
i_refcount
>
0
)
vout_UnlinkPicture
(
p_owner
->
p_vout
,
p_pic
);
}
vout_FixLeaks
(
p_owner
->
p_vout
,
true
);
/* We are about to die. Reattach video output to p_vlc. */
vout_Request
(
p_dec
,
p_owner
->
p_vout
,
NULL
);
...
...
@@ -2088,7 +2080,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
DecoderSignalBuffering
(
p_dec
,
true
);
/* Check the decoder doesn't leak pictures */
vout_FixLeaks
(
p_owner
->
p_vout
);
vout_FixLeaks
(
p_owner
->
p_vout
,
false
);
msleep
(
VOUT_OUTMEM_SLEEP
);
}
...
...
src/video_output/video_output.c
View file @
0e2f21c8
...
...
@@ -628,13 +628,13 @@ void vout_Flush( vout_thread_t *p_vout, mtime_t i_date )
}
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
}
void
vout_FixLeaks
(
vout_thread_t
*
p_vout
)
void
vout_FixLeaks
(
vout_thread_t
*
p_vout
,
bool
b_forced
)
{
int
i_pic
,
i_ready_pic
;
vlc_mutex_lock
(
&
p_vout
->
picture_lock
);
for
(
i_pic
=
0
,
i_ready_pic
=
0
;
i_pic
<
p_vout
->
render
.
i_pictures
;
i_pic
++
)
for
(
i_pic
=
0
,
i_ready_pic
=
0
;
i_pic
<
p_vout
->
render
.
i_pictures
&&
!
b_forced
;
i_pic
++
)
{
const
picture_t
*
p_pic
=
p_vout
->
render
.
pp_picture
[
i_pic
];
...
...
@@ -657,7 +657,7 @@ void vout_FixLeaks( vout_thread_t *p_vout )
break
;
}
}
if
(
i_pic
<
p_vout
->
render
.
i_pictures
)
if
(
i_pic
<
p_vout
->
render
.
i_pictures
&&
!
b_forced
)
{
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
return
;
...
...
@@ -665,7 +665,8 @@ void vout_FixLeaks( vout_thread_t *p_vout )
/* Too many pictures are still referenced, there is probably a bug
* with the decoder */
msg_Err
(
p_vout
,
"pictures leaked, resetting the heap"
);
if
(
!
b_forced
)
msg_Err
(
p_vout
,
"pictures leaked, resetting the heap"
);
/* Just free all the pictures */
for
(
i_pic
=
0
;
i_pic
<
p_vout
->
render
.
i_pictures
;
i_pic
++
)
...
...
src/video_output/vout_internal.h
View file @
0e2f21c8
...
...
@@ -110,7 +110,7 @@ void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
*
* XXX This function is there to workaround bugs in decoder
*/
void
vout_FixLeaks
(
vout_thread_t
*
p_vout
);
void
vout_FixLeaks
(
vout_thread_t
*
p_vout
,
bool
b_forced
);
/**
* This functions will drop a picture retreived by vout_CreatePicture.
...
...
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