]> git.sesse.net Git - vlc/commitdiff
* Fixed a bug in DecoderError.
authorChristophe Massiot <massiot@videolan.org>
Mon, 31 Dec 2001 03:26:27 +0000 (03:26 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 31 Dec 2001 03:26:27 +0000 (03:26 +0000)
* Temporary kludge for vlc_mpeg_adec=mad ./vlc ...

src/input/input_dec.c
src/input/input_ext-dec.c

index 8e57bd8d1af36fbd676c734083767d189004ca96..d72f52e300f475425a05257660e7310bd2ebff78 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.22 2001/12/30 07:09:56 sam Exp $
+ * $Id: input_dec.c,v 1.23 2001/12/31 03:26:27 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -47,11 +47,17 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input,
 {
     probedata_t probedata;
     vlc_thread_t thread_id;
+    char * psz_plugin = NULL;
 
     /* Get a suitable module */
     probedata.i_type = p_es->i_type;
 
-    p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, NULL, &probedata );
+    if( p_es->i_type == MPEG1_AUDIO_ES || p_es->i_type == MPEG2_AUDIO_ES )
+    {
+        psz_plugin = main_GetPszVariable( ADEC_MPEG_VAR, NULL );
+    }
+
+    p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, psz_plugin, &probedata );
     if( p_es->p_module == NULL )
     {
         intf_ErrMsg( "input error: no suitable decoder module for type 0x%x",
index 53f095cf12f64bb6b4bd52089e7e606032f30e98..fe39a1d2923b70a114e6fabca22fc12dc11604f3 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.c: services to the decoders
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ext-dec.c,v 1.26 2001/12/30 07:09:56 sam Exp $
+ * $Id: input_ext-dec.c,v 1.27 2001/12/31 03:26:27 massiot Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -95,6 +95,8 @@ void DecoderError( decoder_fifo_t * p_fifo )
     {
         /* Trash all received PES packets */
         p_fifo->pf_delete_pes( p_fifo->p_packets_mgt, p_fifo->p_first );
+        p_fifo->p_first = NULL;
+        p_fifo->pp_last = &p_fifo->p_first;
 
         /* Waiting for the input thread to put new PES packets in the fifo */
         vlc_cond_wait (&p_fifo->data_wait, &p_fifo->data_lock);