From 9f410e429acdeb12bc75ccc98ee0a325a7c07e37 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Tue, 4 May 2010 22:41:52 +0200 Subject: [PATCH] Fixed picture clean up when closing vout. --- src/video_output/video_output.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index c68b5d3a7e..79c4ad37e0 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -624,22 +624,6 @@ static int ThreadInit(vout_thread_t *vout) return VLC_SUCCESS; } -/***************************************************************************** - * CleanThread: clean up after InitThread - ***************************************************************************** - * This function is called after a sucessful - * initialization. It frees all resources allocated by InitThread. - * XXX You have to enter it with change_lock taken. - *****************************************************************************/ -static void ThreadClean(vout_thread_t *vout) -{ - /* Destroy translation tables */ - if (!vout->p->b_error) { - picture_fifo_Flush(vout->p->decoder_fifo, INT64_MAX, false); - vout_EndWrapper(vout); - } -} - static int ThreadDisplayPicture(vout_thread_t *vout, bool now, mtime_t *deadline) { @@ -1004,6 +988,15 @@ static void ThreadChangeZoom(vout_thread_t *vout, int num, int den) vout_SetDisplayZoom(vout->p->display.vd, num, den); } +static void ThreadClean(vout_thread_t *vout) +{ + /* Destroy translation tables */ + if (!vout->p->b_error) { + ThreadFlush(vout, true, INT64_MAX); + vout_EndWrapper(vout); + } +} + /***************************************************************************** * Thread: video output thread ***************************************************************************** -- 2.39.2