]> git.sesse.net Git - vlc/blobdiff - modules/demux/nuv.c
Fixed aiff support for stereo files and files with odd chunk size.
[vlc] / modules / demux / nuv.c
index fbece3d97e4f7227486c6cbe9f32a1a8aeab5966..cfadb583b76b491065de89c322b9b403b9139520 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * nuv.c:
  *****************************************************************************
- * Copyright (C) 2005 VideoLAN
- * $Id$
+ * Copyright (C) 2005 the VideoLAN team
+ * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
  *
  * 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.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
 #include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <vlc_demux.h>
 
 /* TODO:
  *  - complete support (add support for rtjpeg and raw)
@@ -198,8 +198,8 @@ static int Open( vlc_object_t * p_this )
 
     /* Check id */
     if( stream_Peek( p_demux->s, &p_peek, 12 ) != 12 ||
-        ( strncmp( p_peek, "MythTVVideo", 11 ) &&
-          strncmp( p_peek, "NuppelVideo", 11 ) ) )
+        ( strncmp( (char *)p_peek, "MythTVVideo", 11 ) &&
+          strncmp( (char *)p_peek, "NuppelVideo", 11 ) ) )
         return VLC_EGENERIC;
 
     p_sys = malloc( sizeof( demux_sys_t ) );
@@ -230,7 +230,7 @@ static int Open( vlc_object_t * p_this )
         else
         {
             /* TODO handle rtjpeg */
-            msg_Warn( p_demux, "unsuported 'D' frame (c=%c)", fh.i_compression );
+            msg_Warn( p_demux, "unsupported 'D' frame (c=%c)", fh.i_compression );
             if( stream_Read( p_demux->s, NULL, fh.i_length ) != fh.i_length )
                 goto error;
         }
@@ -524,10 +524,10 @@ static inline void GetDoubleLE( double *pd, void *src )
 {
     /* FIXME works only if sizeof(double) == 8 */
 #ifdef WORDS_BIGENDIAN
-    uint8_t *p = (uint8_t*)pd;
+    uint8_t *p = (uint8_t*)pd, *q = (uint8_t*)src;
     int i;
     for( i = 0; i < 8; i++ )
-        p[i] = src[7-i];
+        p[i] = q[7-i];
 #else
     memcpy( pd, src, 8 );
 #endif