[vlc-commits] vout: remove vout_Reset()
Thomas Guillem
git at videolan.org
Wed Jan 18 07:54:18 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 5 11:30:19 2017 +0100| [95810fbd6f60acffa4895c973e2e1b1ff872a488] | committer: Thomas Guillem
vout: remove vout_Reset()
Pictures from leaking decoders won't be reset anymore. This may cause a freeze
if a vout is reused after a leaking decoder.
The call to ThreadFlush(vout, true, INT64_MAX) is now done from ThreadReinit().
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95810fbd6f60acffa4895c973e2e1b1ff872a488
---
src/input/decoder.c | 4 ----
src/video_output/video_output.c | 35 -----------------------------------
src/video_output/vout_control.h | 5 -----
3 files changed, 44 deletions(-)
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 27549e3..1e8189a 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -1793,10 +1793,6 @@ 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
- * and that the vout is not paused anymore */
- vout_Reset( p_owner->p_vout );
-
/* */
input_resource_RequestVout( p_owner->p_resource, p_owner->p_vout, NULL,
0, true );
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 7751ae6..764e2da 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -332,12 +332,6 @@ void vout_Flush(vout_thread_t *vout, mtime_t date)
vout_control_WaitEmpty(&vout->p->control);
}
-void vout_Reset(vout_thread_t *vout)
-{
- vout_control_PushVoid(&vout->p->control, VOUT_CONTROL_RESET);
- vout_control_WaitEmpty(&vout->p->control);
-}
-
bool vout_IsEmpty(vout_thread_t *vout)
{
picture_t *picture = picture_fifo_Peek(vout->p->decoder_fifo);
@@ -1207,32 +1201,6 @@ static void ThreadFlush(vout_thread_t *vout, bool below, mtime_t date)
picture_fifo_Flush(vout->p->decoder_fifo, date, below);
}
-static void ThreadReset(vout_thread_t *vout)
-{
- ThreadFlush(vout, true, INT64_MAX);
- if (vout->p->decoder_pool) {
- unsigned count, leaks;
-
- if (vout->p->private_pool != NULL) {
- count = picture_pool_GetSize(vout->p->private_pool);
- picture_pool_Release(vout->p->private_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);
- if (vout->p->private_pool == NULL)
- abort();
- }
- }
- vout->p->pause.is_on = false;
- vout->p->pause.date = mdate();
-}
-
static void ThreadStep(vout_thread_t *vout, mtime_t *duration)
{
*duration = 0;
@@ -1603,9 +1571,6 @@ static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
case VOUT_CONTROL_FLUSH:
ThreadFlush(vout, false, cmd.u.time);
break;
- case VOUT_CONTROL_RESET:
- ThreadReset(vout);
- break;
case VOUT_CONTROL_STEP:
ThreadStep(vout, cmd.u.time_ptr);
break;
diff --git a/src/video_output/vout_control.h b/src/video_output/vout_control.h
index e50c096..8fbefa6 100644
--- a/src/video_output/vout_control.h
+++ b/src/video_output/vout_control.h
@@ -51,11 +51,6 @@ void vout_GetResetStatistic( vout_thread_t *p_vout, unsigned *pi_displayed,
void vout_Flush( vout_thread_t *p_vout, mtime_t i_date );
/*
- * Reset the states of the vout.
- */
-void vout_Reset( vout_thread_t *p_vout );
-
-/*
* Cancel the vout, if cancel is true, it won't return any pictures after this
* call.
*/
More information about the vlc-commits
mailing list