+ /* Destroy translation tables */
+ if( !p_vout->b_error )
+ p_vout->pf_end( p_vout );
+}
+
+/*****************************************************************************
+ * EndThread: thread destruction
+ *****************************************************************************
+ * This function is called when the thread ends.
+ * It frees all resources not allocated by InitThread.
+ * XXX You have to enter it with change_lock taken.
+ *****************************************************************************/
+static void EndThread( vout_thread_t *p_vout )
+{
+#ifdef STATS
+ {
+ struct tms cpu_usage;
+ times( &cpu_usage );
+
+ msg_Dbg( p_vout, "cpu usage (user: %d, system: %d)",
+ cpu_usage.tms_utime, cpu_usage.tms_stime );
+ }
+#endif
+
+ /* FIXME does that function *really* need to be called inside the thread ? */
+