]> git.sesse.net Git - vlc/blobdiff - modules/codec/faad.c
avcodec: deinterleave samples if input format for codec is planar
[vlc] / modules / codec / faad.c
index a4c397f7b74705f7695eb8bca211b334e9a70a48..2e58569860507a575bdfd7138ebb11ce07cc85fc 100644 (file)
@@ -1,27 +1,35 @@
 /*****************************************************************************
  * faad.c: AAC decoder using libfaad2
  *****************************************************************************
- * Copyright (C) 2001, 2003 the VideoLAN team
+ * Copyright (C) 2001, 2003 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Gildas Bazin <gbazin@videolan.org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
+/*****************************************************************************
+ * NOTA BENE: this module requires the linking against a library which is
+ * known to require licensing under the GNU General Public License version 2
+ * (or later). Therefore, the result of compiling this module will normally
+ * be subject to the terms of that later license.
+ *****************************************************************************/
+
+
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -315,7 +323,6 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         void *samples;
         faacDecFrameInfo frame;
         block_t *p_out;
-        int i, j;
 
         samples = faacDecDecode( p_sys->hfaad, &frame,
                                  p_sys->p_buffer, p_sys->i_buffer );
@@ -434,7 +441,8 @@ static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         /* Convert frame.channel_position to our own channel values */
         p_dec->fmt_out.audio.i_physical_channels = 0;
         const uint32_t nbChannels = frame.channels;
-        for( i = 0; i < nbChannels; i++ )
+        unsigned j;
+        for( unsigned i = 0; i < nbChannels; i++ )
         {
             /* Find the channel code */
             for( j = 0; j < MAX_CHANNEL_POSITIONS; j++ )