]> git.sesse.net Git - vlc/commitdiff
dv: destroy mutex after vlc_pthread_join()
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Thu, 25 Jun 2009 08:38:32 +0000 (10:38 +0200)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Thu, 25 Jun 2009 08:53:21 +0000 (10:53 +0200)
(cherry picked from commit f23f5e62dcb29ca9b12a1cac73a00c464dbe6f3d)

Signed-off-by: Jean-Paul Saman <jean-paul.saman@m2x.nl>
modules/access/dv.c

index 3491eb229c81e149314f2778960f80ab00f6fd3f..e1b2aca73483b89ae7425a6a74b58cc2e3c8a607 100644 (file)
@@ -275,17 +275,15 @@ static void Close( vlc_object_t *p_this )
         if( p_sys->p_raw1394 )
             raw1394_iso_shutdown( p_sys->p_raw1394 );
 
-        vlc_mutex_destroy( &p_sys->p_ev->lock );
         vlc_thread_join( p_sys->p_ev );
+        vlc_mutex_destroy( &p_sys->p_ev->lock );
 
         /* Cleanup frame data */
         if( p_sys->p_ev->p_frame )
         {
-            vlc_mutex_lock( &p_sys->p_ev->lock );
             block_ChainRelease( p_sys->p_ev->p_frame );
             p_sys->p_ev->p_frame = NULL;
             p_sys->p_ev->pp_last = &p_sys->p_frame;
-            vlc_mutex_unlock( &p_sys->p_ev->lock );
         }
         vlc_object_release( p_sys->p_ev );
     }