]> git.sesse.net Git - vlc/commitdiff
. destroy fifo mutex and cond variables _after_ they are used for
authorSam Hocevar <sam@videolan.org>
Fri, 12 Jan 2001 14:49:55 +0000 (14:49 +0000)
committerSam Hocevar <sam@videolan.org>
Fri, 12 Jan 2001 14:49:55 +0000 (14:49 +0000)
   the last time. henri, that'll be one binouze.

src/input/input_dec.c
src/input/input_programs.c

index 2d92835806ab8377162c9b894b1509eb3d299d84..769d6cf35a9cf9ebdb075f9d356de7e0aacdc8d4 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_dec.c,v 1.4 2001/01/10 19:22:11 massiot Exp $
+ * $Id: input_dec.c,v 1.5 2001/01/12 14:49:55 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -61,10 +61,6 @@ void input_EndDecoder( input_thread_t * p_input, es_descriptor_t * p_es )
         input_DecodePES( p_es->p_decoder_fifo, p_es->p_pes );
     }
 
-    /* Destroy the lock and cond */
-    vlc_cond_destroy( &p_es->p_decoder_fifo->data_wait );
-    vlc_mutex_destroy( &p_es->p_decoder_fifo->data_lock );
-    
     /* Waiting for the thread to exit */
     vlc_thread_join( p_es->thread_id );
 
index 10d85b9794fbfea0c3520daea6ea220c5de3d95b..a81b2ec4873b30e75b747789903a615465d3d369 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.23 2001/01/10 19:22:11 massiot Exp $
+ * $Id: input_programs.c,v 1.24 2001/01/12 14:49:55 sam Exp $
  *
  * Authors:
  *
@@ -342,6 +342,11 @@ void input_DelES( input_thread_t * p_input, es_descriptor_t * p_es )
     if( p_es->p_decoder_fifo != NULL )
     {
         input_EndDecoder( p_input, p_es );
+
+        /* Destroy the lock and cond */
+        vlc_cond_destroy( &p_es->p_decoder_fifo->data_wait );
+        vlc_mutex_destroy( &p_es->p_decoder_fifo->data_lock );
+    
         free( p_es->p_decoder_fifo );
     }