]> git.sesse.net Git - vlc/blobdiff - modules/codec/faad.c
For consistency, remove references to vlc from libvlc
[vlc] / modules / codec / faad.c
index c1a5447662692879d73ac5c9b28f9e6f719953b5..dc33496be6a4b6a41cb2521ef4a6185a85760e3b 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * decoder.c: AAC decoder using libfaad2
  *****************************************************************************
- * Copyright (C) 2001, 2003 VideoLAN
+ * Copyright (C) 2001, 2003 the VideoLAN team
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include <vlc/vlc.h>
@@ -37,6 +37,8 @@ static void Close( vlc_object_t * );
 vlc_module_begin();
     set_description( _("AAC audio decoder (using libfaad2)") );
     set_capability( "decoder", 100 );
+    set_category( CAT_INPUT );
+    set_subcategory( SUBCAT_INPUT_ACODEC );
     set_callbacks( Open, Close );
 vlc_module_end();
 
@@ -116,7 +118,7 @@ static int Open( vlc_object_t *p_this )
     aout_DateSet( &p_sys->date, 0 );
     p_dec->fmt_out.i_cat = AUDIO_ES;
 
-    if (p_this->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
+    if (p_this->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU)
         p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
     else
         p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
@@ -151,7 +153,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Set the faad config */
     cfg = faacDecGetCurrentConfiguration( p_sys->hfaad );
-    if (p_this->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
+    if (p_this->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU)
         cfg->outputFormat = FAAD_FMT_FLOAT;
     else
         cfg->outputFormat = FAAD_FMT_16BIT;
@@ -179,7 +181,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
     p_block = *pp_block;
 
-    if( p_block->i_flags&BLOCK_FLAG_DISCONTINUITY )
+    if( p_block->i_flags&(BLOCK_FLAG_DISCONTINUITY|BLOCK_FLAG_CORRUPTED) )
     {
         block_Release( p_block );
         return NULL;
@@ -402,7 +404,7 @@ static void DoReordering( decoder_t *p_dec,
     }
 
     /* Do the actual reordering */
-    if( p_dec->p_libvlc->i_cpu & CPU_CAPABILITY_FPU )
+    if( p_dec->p_libvlc_global->i_cpu & CPU_CAPABILITY_FPU )
         for( i = 0; i < i_samples; i++ )
             for( j = 0; j < i_nb_channels; j++ )
                 p_out[i * i_nb_channels + pi_chan_table[j]] =