]> git.sesse.net Git - vlc/commitdiff
vout: Make sure vout_Close() has been called before the object destruction.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 17 Jul 2008 21:06:01 +0000 (23:06 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 17 Jul 2008 22:18:16 +0000 (00:18 +0200)
src/video_output/video_output.c

index e0837c6bb4d8bc8da3a2e5aeafb37d3035b80ffc..4b0744ed25e31e6166ea35303352e4f6f36d89a3 100644 (file)
@@ -463,6 +463,7 @@ void vout_Close( vout_thread_t *p_vout )
     vlc_object_kill( p_vout );
     vlc_thread_join( p_vout );
     module_Unneed( p_vout, p_vout->p_module );
+    p_vout->p_module = NULL;
 }
 
 /* */
@@ -470,6 +471,9 @@ static void vout_Destructor( vlc_object_t * p_this )
 {
     vout_thread_t *p_vout = (vout_thread_t *)p_this;
 
+    /* Make sure the vout was stopped first */
+    assert( !p_vout->p_module );
+
     /* Destroy the locks */
     vlc_mutex_destroy( &p_vout->picture_lock );
     vlc_mutex_destroy( &p_vout->change_lock );