Commit 186e68fd authored by Laurent Aimar's avatar Laurent Aimar

* all: moved Get(D/Q)WLE and Get(D/Q)WBE to include/vlc_common.h.

 (Well, Get(D/Q)WBE are just #define to U16/32/64_AT.
parent c8b4bd8b
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.73 2003/08/14 20:02:55 zorglub Exp $
* $Id: vlc_common.h,v 1.74 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -457,6 +457,32 @@ static inline uint64_t U64_AT( void * _p )
| ((uint64_t)p[4] << 24) | ((uint64_t)p[5] << 16)
| ((uint64_t)p[6] << 8) | p[7] );
}
static inline uint16_t GetWLE( void * _p )
{
uint8_t * p = (uint8_t *)_p;
return ( ((uint16_t)p[1] << 8) | p[0] );
}
static inline uint32_t GetDWLE( void * _p )
{
uint8_t * p = (uint8_t *)_p;
return ( ((uint32_t)p[3] << 24) | ((uint32_t)p[2] << 16)
| ((uint32_t)p[1] << 8) | p[0] );
}
static inline uint64_t GetQWLE( void * _p )
{
uint8_t * p = (uint8_t *)_p;
return ( ((uint64_t)p[7] << 56) | ((uint64_t)p[6] << 48)
| ((uint64_t)p[5] << 40) | ((uint64_t)p[4] << 32)
| ((uint64_t)p[3] << 24) | ((uint64_t)p[2] << 16)
| ((uint64_t)p[1] << 8) | p[0] );
}
#define GetWBE( p ) U16_AT( p )
#define GetDWBE( p ) U32_AT( p )
#define GetQWBE( p ) U64_AT( p )
#if WORDS_BIGENDIAN
# define hton16(i) ( i )
# define hton32(i) ( i )
......
......@@ -2,7 +2,7 @@
* mms.h: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mms.h,v 1.9 2003/04/20 19:29:43 fenrir Exp $
* $Id: mms.h,v 1.10 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -35,17 +35,6 @@ void E_( MMSTUClose ) ( input_thread_t * );
int E_( MMSHOpen ) ( input_thread_t * );
void E_( MMSHClose ) ( input_thread_t * );
static inline uint16_t GetWLE( uint8_t *p_buff )
{
return( (p_buff[0]) + ( p_buff[1] <<8 ) );
}
static inline uint32_t GetDWLE( uint8_t *p_buff )
{
return( p_buff[0] + ( p_buff[1] <<8 ) +
( p_buff[2] <<16 ) + ( p_buff[3] <<24 ) );
}
#define FREE( p ) if( p ) { free( p ); (p) = NULL; }
/* url: [/]host[:port][/path][@username[:password]] */
......
......@@ -2,7 +2,7 @@
* mmsh.c:
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mmsh.c,v 1.4 2003/07/31 23:44:49 fenrir Exp $
* $Id: mmsh.c,v 1.5 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -974,6 +974,7 @@ static http_field_t *http_field_find( http_field_t *p_field, char *psz_name )
return NULL;
}
#if 0
static char *http_field_get_value( http_answer_t *ans, char *psz_name )
{
http_field_t *p_field = ans->p_fields;
......@@ -990,7 +991,7 @@ static char *http_field_get_value( http_answer_t *ans, char *psz_name )
return NULL;
}
#endif
static int chunk_parse( chunk_t *ck, uint8_t *p_data, int i_data )
......
......@@ -2,7 +2,7 @@
* mmsh.h:
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mmsh.h,v 1.2 2003/05/06 02:01:35 fenrir Exp $
* $Id: mmsh.h,v 1.3 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -100,7 +100,7 @@ typedef struct
static http_answer_t *http_answer_parse ( uint8_t *, int );
static void http_answer_free ( http_answer_t * );
static char *http_field_get_value ( http_answer_t *, char * );
/* static char *http_field_get_value ( http_answer_t *, char * ); */
static http_field_t *http_field_find ( http_field_t *, char * );
static int mmsh_start( input_thread_t *, access_sys_t *, off_t );
......
......@@ -2,7 +2,7 @@
* v4l.c : Video4Linux input module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: v4l.c,v 1.19 2003/07/24 22:05:16 sam Exp $
* $Id: v4l.c,v 1.20 2003/08/17 23:02:51 fenrir Exp $
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
* Paul Forgey <paulf at aphrodite dot com>
......@@ -197,16 +197,6 @@ static void SetQWBE( uint8_t *p, uint64_t qw )
SetDWBE( &p[4], qw&0xffffffff);
}
static uint32_t GetDWBE( uint8_t *p_buff )
{
return( ( p_buff[0] << 24 ) + ( p_buff[1] << 16 ) +
( p_buff[2] << 8 ) + p_buff[3] );
}
static uint64_t GetQWBE( uint8_t *p )
{
return( ( (uint64_t)GetDWBE( p ) << 32) | (uint64_t)GetDWBE( &p[4] ) );
}
/*****************************************************************************
* Open: open device:
*****************************************************************************
......
......@@ -2,7 +2,7 @@
* adpcm.c : adpcm variant audio decoder
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: adpcm.c,v 1.11 2003/05/22 20:56:07 hartman Exp $
* $Id: adpcm.c,v 1.12 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -216,12 +216,6 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
#define FREE( p ) if( p ) free( p ); p = NULL
#define GetWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) + \
( *((uint8_t*)(p)+2) << 16 ) + ( *((uint8_t*)(p)+3) << 24 ) )
/*****************************************************************************
* InitThread: initialize data before entering main loop
......
......@@ -2,7 +2,7 @@
* araw.c: Pseudo audio decoder; for raw pcm data
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: araw.c,v 1.15 2003/05/17 20:30:31 gbazin Exp $
* $Id: araw.c,v 1.16 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -228,13 +228,6 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
#define FREE( p ) if( p ) free( p ); p = NULL
#define GetWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) + \
( *((u8*)(p)+2) << 16 ) + ( *((u8*)(p)+3) << 24 ) )
/*****************************************************************************
* InitThread: initialize data before entering main loop
......
......@@ -2,7 +2,7 @@
* cinepak.c: cinepak video decoder
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: cinepak.c,v 1.10 2003/02/27 13:19:44 gbazin Exp $
* $Id: cinepak.c,v 1.11 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -132,17 +132,6 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
* locales Functions
*****************************************************************************/
static inline u16 GetWBE( u8 *p_buff )
{
return( (p_buff[0]<<8) + p_buff[1] );
}
static inline u32 GetDWBE( u8 *p_buff )
{
return( (p_buff[0] << 24) + ( p_buff[1] <<16 ) +
( p_buff[2] <<8 ) + p_buff[3] );
}
#define GET2BYTES( p ) \
GetWBE( p ); p+= 2;
/* FIXME */
......
......@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: decoder.c,v 1.25 2003/06/22 08:49:11 fenrir Exp $
* $Id: decoder.c,v 1.26 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -134,13 +134,6 @@ static unsigned int pi_channels_maps[7] =
};
#define FREE( p ) if( p != NULL ) free( p ); p = NULL
#define GetWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(uint8_t*)(p) + ( *((uint8_t*)(p)+1) << 8 ) + \
( *((uint8_t*)(p)+2) << 16 ) + ( *((uint8_t*)(p)+3) << 24 ) )
static void GetPESData( uint8_t *p_buf, int i_max, pes_packet_t *p_pes )
{
......
......@@ -2,7 +2,7 @@
* ffmpeg_vdec.h: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ffmpeg.h,v 1.23 2003/08/15 13:16:38 fenrir Exp $
* $Id: ffmpeg.h,v 1.24 2003/08/17 23:02:52 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -55,13 +55,6 @@ typedef struct generic_thread_s
# undef LIBAVCODEC_PP
#endif
#define GetWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) )
#define GetDWLE( p ) \
( *(u8*)(p) + ( *((u8*)(p)+1) << 8 ) + \
( *((u8*)(p)+2) << 16 ) + ( *((u8*)(p)+3) << 24 ) )
#define FREE( p ) if( p ) free( p ); p = NULL
int E_( GetPESData )( u8 *p_buf, int i_max, pes_packet_t *p_pes );
......
......@@ -2,7 +2,7 @@
* quicktime.c: a quicktime decoder that uses the QT library/dll
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: quicktime.c,v 1.10 2003/08/01 20:06:43 gbazin Exp $
* $Id: quicktime.c,v 1.11 2003/08/17 23:02:51 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir at via.ecp.fr>
* Derk-Jan Hartman <thedj at users.sf.net>
......@@ -231,18 +231,6 @@ static int pi_channels_maps[6] =
};
static uint16_t GetWBE( uint8_t *p_buff )
{
return( (p_buff[0]<<8) + p_buff[1] );
}
static uint32_t GetDWBE( uint8_t *p_buff )
{
return( (p_buff[0] << 24) + ( p_buff[1] <<16 ) +
( p_buff[2] <<8 ) + p_buff[3] );
}
static int GetPESData( uint8_t *p_buf, int i_max, pes_packet_t *p_pes )
{
int i_copy;
......
......@@ -2,7 +2,7 @@
* asf.c : ASFv01 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: asf.c,v 1.30 2003/08/01 00:16:37 fenrir Exp $
* $Id: asf.c,v 1.31 2003/08/17 23:02:52 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -51,16 +51,6 @@ vlc_module_begin();
add_shortcut( "asf" );
vlc_module_end();
static uint16_t GetWLE( uint8_t *p_buff )
{
return( (p_buff[0]) + ( p_buff[1] <<8 ) );
}
static uint32_t GetDWLE( uint8_t *p_buff )
{
return( p_buff[0] + ( p_buff[1] <<8 ) +
( p_buff[2] <<16 ) + ( p_buff[3] <<24 ) );
}
/*****************************************************************************
* Activate: check file and initializes ASF structures
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* libasf.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libasf.c,v 1.12 2003/03/14 00:24:08 sigmunau Exp $
* $Id: libasf.c,v 1.13 2003/08/17 23:02:52 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -43,24 +43,6 @@
(guid).v4[0],(guid).v4[1],(guid).v4[2],(guid).v4[3], \
(guid).v4[4],(guid).v4[5],(guid).v4[6],(guid).v4[7]
/* Some functions to manipulate memory */
static uint16_t GetWLE( uint8_t *p_buff )
{
return( (p_buff[0]) + ( p_buff[1] <<8 ) );
}
static uint32_t GetDWLE( uint8_t *p_buff )
{
return( p_buff[0] + ( p_buff[1] <<8 ) +
( p_buff[2] <<16 ) + ( p_buff[3] <<24 ) );
}
static uint64_t GetQWLE( uint8_t *p_buff )
{
return( ( (uint64_t)GetDWLE( p_buff ) )|
( (uint64_t)GetDWLE( p_buff + 4 ) << 32) );
}
void GetGUID( guid_t *p_guid, uint8_t *p_data )
{
p_guid->v1 = GetDWLE( p_data );
......
......@@ -2,7 +2,7 @@
* au.c : au file input module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: au.c,v 1.3 2003/08/01 00:05:57 fenrir Exp $
* $Id: au.c,v 1.4 2003/08/17 23:02:52 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -55,12 +55,6 @@ vlc_module_end();
static int DemuxPCM ( input_thread_t * );
/* TODO static int DemuxADPCM ( input_thread_t * ); */
#define GetDWBE( p ) __GetDWBE( (uint8_t*)(p) )
static inline uint32_t __GetDWBE( uint8_t *p )
{
return( ( p[0] << 24 ) + ( p[1] << 16 ) + ( p[2] << 8 ) + p[3] );
}
enum AuType_e
{
AU_UNKNOWN = 0,
......
......@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.53 2003/07/20 12:34:36 sigmunau Exp $
* $Id: avi.c,v 1.54 2003/08/17 23:02:52 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -70,26 +70,6 @@ vlc_module_begin();
set_callbacks( AVIInit, __AVIEnd );
vlc_module_end();
/*****************************************************************************
* Some useful functions to manipulate memory
*****************************************************************************/
static uint16_t GetWLE( uint8_t *p_buff )
{
return (uint16_t)p_buff[0] | ( ((uint16_t)p_buff[1]) << 8 );
}
static uint32_t GetDWLE( uint8_t *p_buff )
{
return (uint32_t)p_buff[0] | ( ((uint32_t)p_buff[1]) << 8 ) |
( ((uint32_t)p_buff[2]) << 16 ) | ( ((uint32_t)p_buff[3]) << 24 );
}
static uint32_t GetDWBE( uint8_t *p_buff )
{
return (uint32_t)p_buff[3] | ( ((uint32_t)p_buff[2]) << 8 ) |
( ((uint32_t)p_buff[1]) << 16 ) | ( ((uint32_t)p_buff[0]) << 24 );
}
static vlc_fourcc_t GetFOURCC( byte_t *p_buff )
{
return VLC_FOURCC( p_buff[0], p_buff[1], p_buff[2], p_buff[3] );
......
......@@ -2,7 +2,7 @@
* libavi.c :
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.21 2003/08/01 00:05:07 gbazin Exp $
* $Id: libavi.c,v 1.22 2003/08/17 23:02:52 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -37,26 +37,6 @@
#define __EVEN( x ) ( (x)&0x01 ? (x)+1 : (x) )
/* Some functions to manipulate memory */
static uint16_t GetWLE( uint8_t *p_buff )
{
return (uint16_t)p_buff[0] | ( ((uint16_t)p_buff[1]) << 8 );
}
static uint32_t GetDWLE( uint8_t *p_buff )
{
return (uint32_t)p_buff[0] | ( ((uint32_t)p_buff[1]) << 8 ) |
( ((uint32_t)p_buff[2]) << 16 ) | ( ((uint32_t)p_buff[3]) << 24 );
}
static uint64_t GetQWLE( uint8_t *p )
{
return (uint64_t)p[0] | ( ((uint64_t)p[1]) << 8 ) |
( ((uint64_t)p[2]) << 16 ) | ( ((uint64_t)p[3]) << 24 ) |
( ((uint64_t)p[4]) << 32 ) | ( ((uint64_t)p[5]) << 40 ) |
( ((uint64_t)p[6]) << 48 ) | ( ((uint64_t)p[7]) << 56 );
}
static vlc_fourcc_t GetFOURCC( byte_t *p_buff )
{
return VLC_FOURCC( p_buff[0], p_buff[1], p_buff[2], p_buff[3] );
......
......@@ -2,7 +2,7 @@
* mkv.cpp : matroska demuxer
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mkv.cpp,v 1.20 2003/08/12 08:19:20 sam Exp $
* $Id: mkv.cpp,v 1.21 2003/08/17 23:02:52 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -158,18 +158,7 @@ class EbmlParser
/*****************************************************************************
* Some functions to manipulate memory
*****************************************************************************/
#define GetWLE( p ) __GetWLE( (uint8_t*)p )
#define GetDWLE( p ) __GetDWLE( (uint8_t*)p )
#define GetFOURCC( p ) __GetFOURCC( (uint8_t*)p )
static uint16_t __GetWLE( uint8_t *p )
{
return (uint16_t)p[0] | ( ((uint16_t)p[1]) << 8 );
}
static uint32_t __GetDWLE( uint8_t *p )
{
return (uint32_t)p[0] | ( ((uint32_t)p[1]) << 8 ) |
( ((uint32_t)p[2]) << 16 ) | ( ((uint32_t)p[3]) << 24 );
}
static vlc_fourcc_t __GetFOURCC( uint8_t *p )
{
return VLC_FOURCC( p[0], p[1], p[2], p[3] );
......
......@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.30 2003/08/17 20:45:50 fenrir Exp $
* $Id: libmp4.c,v 1.31 2003/08/17 23:02:52 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -122,41 +122,11 @@
*/
/* Some functions to manipulate memory */
static uint16_t GetWLE( uint8_t *p_buff )
{
return( (p_buff[0]) + ( p_buff[1] <<8 ) );
}
static uint32_t GetDWLE( uint8_t *p_buff )
{
return( p_buff[0] + ( p_buff[1] <<8 ) +
( p_buff[2] <<16 ) + ( p_buff[3] <<24 ) );
}
static uint16_t GetWBE( uint8_t *p_buff )
{
return( (p_buff[0]<<8) + p_buff[1] );
}
static uint32_t Get24bBE( uint8_t *p_buff )
{
return( ( p_buff[0] <<16 ) + ( p_buff[1] <<8 ) + p_buff[2] );
}
static uint32_t GetDWBE( uint8_t *p_buff )
{
return( (p_buff[0] << 24) + ( p_buff[1] <<16 ) +
( p_buff[2] <<8 ) + p_buff[3] );
}
static uint64_t GetQWBE( uint8_t *p_buff )
{
return( ( (uint64_t)GetDWBE( p_buff ) << 32 )|( (uint64_t)GetDWBE( p_buff + 4 ) ) );
}
static void GetUUID( UUID_t *p_uuid, uint8_t *p_buff )
{
memcpy( p_uuid,
......
......@@ -2,7 +2,7 @@
* mpga.c : MPEG-I/II Audio input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mpga.c,v 1.1 2003/08/01 00:37:06 fenrir Exp $
* $Id: mpga.c,v 1.2 2003/08/17 23:02:52 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -64,12 +64,6 @@ struct demux_sys_t
es_descriptor_t *p_es;
};
static inline uint32_t GetDWBE( uint8_t *p )
{
return( ( p[0] << 24 )|( p[1] << 16 )|( p[2] << 8 )|( p[3] ) );
}
static int HeaderCheck( uint32_t h )
{
if( ((( h >> 20 )&0x0FFF) != 0x0FFF ) /* header sync */
......
......@@ -2,7 +2,7 @@
* ogg.c : ogg stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ogg.c,v 1.30 2003/08/09 19:49:13 gbazin Exp $
* $Id: ogg.c,v 1.31 2003/08/17 23:02:52 fenrir Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -145,22 +145,6 @@ typedef struct stream_header
#define PACKET_LEN_BITS2 0x02
#define PACKET_IS_SYNCPOINT 0x08
/* Some functions to manipulate memory */
static uint16_t GetWLE( uint8_t *p_buff )
{
return( (p_buff[0]) + ( p_buff[1] <<8 ) );
}
static uint32_t GetDWLE( uint8_t *p_buff )
{
return( p_buff[0] + ( p_buff[1] <<8 ) +
( p_buff[2] <<16 ) + ( p_buff[3] <<24 ) );
}
static uint64_t GetQWLE( uint8_t *p_buff )
{
return( GetDWLE( p_buff ) + ( ((uint64_t)GetDWLE( p_buff + 4 )) << 32 ) );
}
/*****************************************************************************
* Local prototypes
*****************************************************************************/
......@@ -883,13 +867,13 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg)
(char *)&p_stream->i_fourcc );
p_stream->f_rate = 10000000.0 /
GetQWLE((uint8_t *)&st->time_unit);
GetQWLE(&st->time_unit);
p_stream->p_bih->biBitCount =
GetWLE((uint8_t *)&st->bits_per_sample);
GetWLE(&st->bits_per_sample);
p_stream->p_bih->biWidth =
GetDWLE((uint8_t *)&st->sh.video.width);
GetDWLE(&st->sh.video.width);
p_stream->p_bih->biHeight =
GetDWLE((uint8_t *)&st->sh.video.height);
GetDWLE(&st->sh.video.height);
p_stream->p_bih->biPlanes= 1 ;
p_stream->p_bih->biSizeImage =
(p_stream->p_bih->biBitCount >> 3) *
......@@ -945,16 +929,16 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg)
p_buffer[4] = '\0';
p_stream->p_wf->wFormatTag = strtol(p_buffer,NULL,16);
p_stream->p_wf->nChannels =
GetWLE((uint8_t *)&st->sh.audio.channels);
GetWLE(&st->sh.audio.channels);
p_stream->f_rate = p_stream->p_wf->nSamplesPerSec =
GetQWLE((uint8_t *)&st->samples_per_unit);
GetQWLE(&st->samples_per_unit);
p_stream->i_bitrate = p_stream->p_wf->nAvgBytesPerSec =
GetDWLE((uint8_t *)&st->sh.audio.avgbytespersec);
GetDWLE(&st->sh.audio.avgbytespersec);
p_stream->i_bitrate *= 8;
p_stream->p_wf->nBlockAlign =
GetWLE((uint8_t *)&st->sh.audio.blockalign);
GetWLE(&st->sh.audio.blockalign);
p_stream->p_wf->wBitsPerSample =
GetWLE((uint8_t *)&st->bits_per_sample);
GetWLE(&st->bits_per_sample);
p_stream->p_wf->cbSize = 0;
switch( p_stream->p_wf->wFormatTag )
......