]> git.sesse.net Git - vlc/commitdiff
Fixed picture clean up when closing vout.
authorLaurent Aimar <fenrir@videolan.org>
Tue, 4 May 2010 20:41:52 +0000 (22:41 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 4 May 2010 20:44:36 +0000 (22:44 +0200)
src/video_output/video_output.c

index c68b5d3a7ed24855a897db5ea0fd2f4d29a5e9ec..79c4ad37e0bea1355bb43163189b643fd86955d5 100644 (file)
@@ -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
  *****************************************************************************