[vlc-commits] Remove AOUT_MAX_INPUTS

Rémi Denis-Courmont git at videolan.org
Thu Apr 7 19:39:40 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr  7 20:39:20 2011 +0300| [a0ee6ee7c61c74a72077ad9474f98deab188f476] | committer: Rémi Denis-Courmont

Remove AOUT_MAX_INPUTS

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a0ee6ee7c61c74a72077ad9474f98deab188f476
---

 include/vlc_aout.h     |    2 +-
 include/vlc_config.h   |    3 ---
 src/audio_output/dec.c |   10 ++--------
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index 25c7e22..2da4775 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -233,7 +233,7 @@ struct aout_instance_t
     vlc_mutex_t             volume_vars_lock;
 
     /* Input streams & pre-filters */
-    aout_input_t *          pp_inputs[AOUT_MAX_INPUTS];
+    aout_input_t *          pp_inputs[1];
     int                     i_nb_inputs;
 
     /* Mixer */
diff --git a/include/vlc_config.h b/include/vlc_config.h
index 7b284b8..ea047fe 100644
--- a/include/vlc_config.h
+++ b/include/vlc_config.h
@@ -92,9 +92,6 @@
 /* Max number of pre-filters per input, and max number of post-filters */
 #define AOUT_MAX_FILTERS                10
 
-/* Max number of inputs */
-#define AOUT_MAX_INPUTS                 5
-
 /* Buffers which arrive in advance of more than AOUT_MAX_ADVANCE_TIME
  * will be considered as bogus and be trashed */
 #define AOUT_MAX_ADVANCE_TIME           (DEFAULT_PTS_DELAY * 5)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index fd82515..0cb9bfc 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -82,12 +82,7 @@ aout_input_t *aout_DecNew( aout_instance_t *p_aout,
     /* We can only be called by the decoder, so no need to lock
      * p_input->lock. */
     aout_lock_mixer( p_aout );
-
-    if ( p_aout->i_nb_inputs >= AOUT_MAX_INPUTS )
-    {
-        msg_Err( p_aout, "too many inputs already (%d)", p_aout->i_nb_inputs );
-        goto error;
-    }
+    assert( p_aout->i_nb_inputs == 0 );
 
     p_input = calloc( 1, sizeof(aout_input_t));
     if( !p_input )
@@ -194,9 +189,8 @@ int aout_DecDelete( aout_instance_t * p_aout, aout_input_t * p_input )
     }
 
     /* Remove the input from the list. */
-    memmove( &p_aout->pp_inputs[i_input], &p_aout->pp_inputs[i_input + 1],
-             (AOUT_MAX_INPUTS - i_input - 1) * sizeof(aout_input_t *) );
     p_aout->i_nb_inputs--;
+    assert( p_aout->i_nb_inputs == 0 );
 
     aout_InputDelete( p_aout, p_input );
 



More information about the vlc-commits mailing list