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
a274331e
Commit
a274331e
authored
Apr 23, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split vout_FixLeaks into vout_FixLeaks and vout_Reset.
No functionnal changes.
parent
fd32a7c3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
src/input/decoder.c
src/input/decoder.c
+2
-4
src/video_output/video_output.c
src/video_output/video_output.c
+6
-9
src/video_output/vout_control.h
src/video_output/vout_control.h
+6
-1
No files found.
src/input/decoder.c
View file @
a274331e
...
@@ -2068,9 +2068,7 @@ static void DeleteDecoder( decoder_t * p_dec )
...
@@ -2068,9 +2068,7 @@ static void DeleteDecoder( decoder_t * p_dec )
{
{
/* Hack to make sure all the the pictures are freed by the decoder
/* Hack to make sure all the the pictures are freed by the decoder
* and that the vout is not paused anymore */
* and that the vout is not paused anymore */
vout_FixLeaks
(
p_owner
->
p_vout
,
true
);
vout_Reset
(
p_owner
->
p_vout
);
if
(
p_owner
->
b_paused
)
vout_ChangePause
(
p_owner
->
p_vout
,
false
,
mdate
()
);
/* */
/* */
input_resource_RequestVout
(
p_owner
->
p_input
->
p
->
p_resource
,
p_owner
->
p_vout
,
NULL
,
true
);
input_resource_RequestVout
(
p_owner
->
p_input
->
p
->
p_resource
,
p_owner
->
p_vout
,
NULL
,
true
);
...
@@ -2379,7 +2377,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
...
@@ -2379,7 +2377,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
DecoderSignalBuffering
(
p_dec
,
true
);
DecoderSignalBuffering
(
p_dec
,
true
);
/* Check the decoder doesn't leak pictures */
/* Check the decoder doesn't leak pictures */
vout_FixLeaks
(
p_owner
->
p_vout
,
false
);
vout_FixLeaks
(
p_owner
->
p_vout
);
/* FIXME add a vout_WaitPictureAvailable (timedwait) */
/* FIXME add a vout_WaitPictureAvailable (timedwait) */
msleep
(
VOUT_OUTMEM_SLEEP
);
msleep
(
VOUT_OUTMEM_SLEEP
);
...
...
src/video_output/video_output.c
View file @
a274331e
...
@@ -592,25 +592,22 @@ void vout_Flush(vout_thread_t *vout, mtime_t date)
...
@@ -592,25 +592,22 @@ void vout_Flush(vout_thread_t *vout, mtime_t date)
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
}
}
static
void
vout_Reset
(
vout_thread_t
*
vout
)
void
vout_Reset
(
vout_thread_t
*
vout
)
{
{
#warning "TODO reset pause in vout_Reset"
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
Flush
(
vout
,
INT64_MAX
,
true
);
Flush
(
vout
,
INT64_MAX
,
true
);
if
(
vout
->
p
->
decoder_pool
)
if
(
vout
->
p
->
decoder_pool
)
picture_pool_NonEmpty
(
vout
->
p
->
decoder_pool
,
true
);
picture_pool_NonEmpty
(
vout
->
p
->
decoder_pool
,
true
);
vout
->
p
->
pause
.
is_on
=
false
;
vout
->
p
->
pause
.
date
=
mdate
();
vlc_cond_signal
(
&
vout
->
p
->
picture_wait
);
vlc_cond_signal
(
&
vout
->
p
->
picture_wait
);
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
}
}
void
vout_FixLeaks
(
vout_thread_t
*
vout
,
bool
b_forced
)
void
vout_FixLeaks
(
vout_thread_t
*
vout
)
{
{
#warning "TODO split vout_FixLeaks into vout_FixLeaks and vout_Reset"
if
(
b_forced
)
{
vout_Reset
(
vout
);
return
;
}
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture_t
*
picture
=
picture_fifo_Peek
(
vout
->
p
->
decoder_fifo
);
picture_t
*
picture
=
picture_fifo_Peek
(
vout
->
p
->
decoder_fifo
);
...
...
src/video_output/vout_control.h
View file @
a274331e
...
@@ -61,7 +61,12 @@ void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
...
@@ -61,7 +61,12 @@ void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
*
*
* XXX This function is there to workaround bugs in decoder
* XXX This function is there to workaround bugs in decoder
*/
*/
void
vout_FixLeaks
(
vout_thread_t
*
p_vout
,
bool
b_forced
);
void
vout_FixLeaks
(
vout_thread_t
*
p_vout
);
/*
* Reset the states of the vout.
*/
void
vout_Reset
(
vout_thread_t
*
p_vout
);
/**
/**
* This functions will drop a picture retreived by vout_CreatePicture.
* 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